TsgcWebSocketHTTPServer › Properties › HTTP2Options
Enables and tunes the HTTP/2 protocol handler used to serve HTTPS requests.
public TsgcWSHTTP2Server_Options HTTP2Options { get; set; }
Enabled=False
By default the server uses HTTP/1.1 for HTTP requests. Set HTTP2Options.Enabled to True to advertise HTTP/2 over ALPN; clients that do not support HTTP/2 fall back to HTTP/1.1 automatically. The Settings sub-object exposes the tunables defined in RFC 7540: EnablePush controls server push (enabled by default), HeaderTableSize sets the HPACK table size (initial 4,096 octets), InitialWindowSize sets the per-stream flow-control window (initial 65,535 octets), MaxConcurrentStreams caps the number of simultaneous streams, MaxFrameSize the largest payload accepted (initial 16,384 octets), and MaxHeaderListSize the maximum uncompressed header list size. FragmentedData selects how partial responses are delivered (h2fdOnlyBuffer, h2fdAll, h2fdOnlyFragmented). HTTP/2 requires TLS — make sure SSL is enabled.
oServer = new TsgcWebSocketHTTPServer();
oServer.SSL = true;
oServer.HTTP2Options.Enabled = true;
oServer.HTTP2Options.Settings.EnablePush = true;
oServer.Active = true;