TsgcQUICClient › Properties › QUICOptions

QUICOptions Property

Transport tuning for the QUIC connection, exposed through a single Settings sub-object.

Type

TsgcQUICClient_Options

Syntax

property QUICOptions: TsgcQUICClient_Options read FQUICOptions write SetQUICOptions;

Default

Created automatically by the component constructor. See the per-field defaults below.

Structure

TsgcQUICClient_Options has exactly one property, Settings, of type TsgcQUICSettings. Everything you can tune lives under QUICOptions.Settings.

QUICOptions.Settings

NameTypeDefaultDescription
PMTUInteger1200Path MTU in bytes, the largest QUIC packet the client will build. 1200 is the conservative floor RFC 9000 guarantees is routable without fragmentation. Raise it only on a network you control and where you know the path MTU is larger, a value above the real path MTU causes packets to be dropped silently.
MaxDataInteger10000000Connection-level flow control credit in bytes, advertised to the peer as the total it may send across all streams.
MaxStreamDataInteger78125Per-stream flow control credit in bytes, the amount the peer may send on any single stream before it must wait for the client to extend the window.
MaximumStreamIdInteger128Upper bound on the stream identifiers the client will track, which caps how many streams a connection can carry.
MaximumConnectionIdsInteger8How many connection identifiers the client keeps at once. QUIC uses spare connection ids to survive a change of IP address or port.
MaximumFramesPerPacketInteger10How many QUIC frames the client will coalesce into a single packet before starting a new one.
MaximumInitialPacketNumberInteger100Upper bound applied to the packet number used during the handshake (Initial packet number space).
CanAcceptInitialClientConnectionIdBooleanFalseWhether a connection id chosen by the client side is accepted for the Initial packets rather than the one the server picks.
ShouldBufferPacketsBeforeConnectionBooleanFalseWhen True, packets produced before the connection is fully established are buffered and flushed once it is ready, instead of being discarded.

Remarks

Adjust the sub-properties before opening the connection. PMTU in particular is copied onto the connection object when it is created, so a change made on a live connection is not picked up. TLS related configuration lives in SSLQUICOptions, not here.

The writer of this property does not replace the object, it assigns the source into the existing instance. QUICOptions := SomeOtherOptions copies the values across, it does not take ownership of the other object, and the same is true in .NET.

Which settings actually apply depends on the QUIC engine. These fields drive the custom pure-Pascal QUIC engine (qmCustom), which owns its own packet builder and flow control. Under the builtin OpenSSL QUIC engine (qmBuiltin) the transport parameters are negotiated by OpenSSL itself and most of these values are not consulted. The engine is selected automatically at load time, see TsgcQUICClient. In the .NET implementation the whole settings object is kept for API parity but the managed System.Net.Quic stack negotiates the transport itself, so only PMTU is carried onto the connection object.

The defaults in the table above are the Delphi ones. The .NET build initialises PMTU to 1200, MaximumConnectionIds to 8 and MaximumStreamId to 128 as shown, but leaves MaxData, MaxStreamData, MaximumFramesPerPacket and MaximumInitialPacketNumber at 0, since the managed stack does not read them.

The defaults are safe and interoperable. Change them only when you have measured a reason to.

Example


oClient := TsgcQUICClient.Create(nil);
oClient.Host := 'www.example.com';
oClient.Port := 443;

// raise the per-stream window for a bulk transfer on a known network
oClient.QUICOptions.Settings.MaxStreamData := 1000000;
oClient.QUICOptions.Settings.MaxData := 20000000;

oClient.Connect;

Back to Properties