TsgcHTTP3Server › Properties › H3Settings

H3Settings Property

HTTP/3 protocol settings advertised to peers in the SETTINGS frame.

Syntax

property H3Settings: TsgcHTTP3ServerSettings;

Type

TsgcHTTP3ServerSettings

Default

— (a sub-object created with the component; see the member defaults below)

Remarks

H3Settings holds the HTTP/3 connection parameters the server announces to each client in its control-stream SETTINGS frame (RFC 9114 section 7.2.4). Assigning to H3Settings copies the source object's members rather than replacing the object, so the sub-object reference stays valid.

TsgcHTTP3ServerSettings

The object has two members: a nested Settings object carrying the values that actually travel in the SETTINGS frame, and MaxConcurrentStreams.

MemberTypeDefaultDescription
SettingsTsgcHTTP3Settings—The SETTINGS frame parameters, detailed below. The same object is also reachable through the Settings shortcut on the component.
MaxConcurrentStreamsInteger100Intended maximum number of concurrent request streams per connection.

Settings (TsgcHTTP3Settings)

MemberTypeDefaultDescription
QPACKMaxTableCapacityInt640SETTINGS_QPACK_MAX_TABLE_CAPACITY. Maximum size, in bytes, of the QPACK dynamic table a client may use when compressing the header fields it sends to this server. 0 means the client must not use the dynamic table, so requests are encoded against the static table only. It also bounds the server's own decoder capacity.
MaxFieldSectionSizeInt640SETTINGS_MAX_FIELD_SECTION_SIZE. Maximum size, in bytes, of a header field section the server accepts. 0 means unlimited. A non-zero value is also enforced as an inbound limit: a HEADERS frame declaring a larger length is rejected before its payload is buffered.
QPACKBlockedStreamsInt640SETTINGS_QPACK_BLOCKED_STREAMS. Number of request streams the client's encoder may leave blocked waiting for QPACK dynamic-table updates.
EnableConnectProtocolBooleanFalseSETTINGS_ENABLE_CONNECT_PROTOCOL (RFC 9220 / RFC 8441). Set to True to tell clients they may send an Extended CONNECT, that is, a CONNECT carrying a :protocol pseudo-header. Enabling WebTransport advertises this automatically.
EnableDatagramBooleanFalseSETTINGS_H3_DATAGRAM (RFC 9297). Read the datagram note below before relying on it.
WebTransportMaxSessionsInt640SETTINGS_WEBTRANSPORT_MAX_SESSIONS. Number of concurrent WebTransport sessions the server accepts. 0 disables WebTransport. Any value greater than zero enables it, makes the server also advertise SETTINGS_ENABLE_CONNECT_PROTOCOL and SETTINGS_H3_DATAGRAM, and lets OnWebTransportSession fire.

The defaults are conservative rather than tuned: QPACK dynamic-table compression and the field-section limit start switched off, which is valid HTTP/3 and interoperates with every client. Raise QPACKMaxTableCapacity to let clients compress repeated headers, and set MaxFieldSectionSize to bound how large a header section a peer may send.

Settings are read when a connection is established and sent once on the control stream, so changes affect new connections only. Assign them before Start.

Datagram note. Advertising EnableDatagram does not make datagrams deliverable. The QUIC engine in OpenSSL does not implement the RFC 9221 DATAGRAM extension, so no WebTransport datagram can be put on the wire, and TsgcWebTransportSession.SendDatagram raises TsgcQUICException instead of losing the payload. See SendDatagram. WebTransport streams are unaffected.

Why SETTINGS_H3_DATAGRAM is still advertised. Setting WebTransportMaxSessions above zero makes the server advertise SETTINGS_H3_DATAGRAM even though datagrams are inert, and that is deliberate rather than an oversight. The WebTransport over HTTP/3 draft requires the setting to be present, and browsers refuse to establish a WebTransport session without it. The server advertises it so those clients interoperate and the stream half of WebTransport works, which is the half that carries data here. A peer that takes the setting at face value and sends the server a datagram simply gets no reply, since nothing can deliver one to the session.

WebTransportMaxSessions and the behavior it enables require the SGC_WEBTRANSPORT conditional define.

Example


// let clients use a 4 KB QPACK dynamic table and cap header sections at 64 KB
oServer.H3Settings.Settings.QPACKMaxTableCapacity := 4096;
oServer.H3Settings.Settings.MaxFieldSectionSize := 65536;
oServer.H3Settings.MaxConcurrentStreams := 200;
oServer.Start;

Back to Properties