TsgcWebSocketHTTPServerProperties › HTTP2Options

HTTP2Options Property

Enables and tunes the HTTP/2 protocol handler used to serve HTTPS requests.

Syntax

public TsgcWSHTTP2Server_Options HTTP2Options { get; set; }

Default Value

Enabled=False

Remarks

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.

Example


oServer = new TsgcWebSocketHTTPServer();
oServer.SSL = true;
oServer.HTTP2Options.Enabled = true;
oServer.HTTP2Options.Settings.EnablePush = true;
oServer.Active = true;

Back to Properties