Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

StreamSec.Quic.Server

Feature notes: Asynchronous QUIC server and HTTP/3 component

Classes, interfaces and records

classtQuicServerConnection

One externally serialized server connection over a borrowed shared socket. The listener routes complete datagrams by destination CID and supplies monotone microseconds. This object never reads or closes that socket. Configure the returned TLS session before Start; the host outlives it. Initial keys use the current Initial destination ID. Local parameters separately bind the original destination and any validated Retry source.

Shared const arrays remain read-only through every alias. Actual successful UDP sends commit output, recovery, pacing and amplification bytes; failed sends retain work but never reuse their allocated packet number. Consecutive ordinary 1-RTT packets of one size and one ECN marking go to the socket in one SendSegmentsTo call (SendSegmentsToEcn when marked): each datagram it accepts commits in order, and the frames of the others return to the output queue. Receive consumption and explicitly advertised flow credit are independent of array lifetime. Early data is refused. Initial source CID aliases are accepted until authenticated Handshake receipt. The initial server policy uses a fixed 1200-byte path and advertises disabled active migration. Authenticated peer rebinding uses a bounded candidate and full-size challenge validation; only a fresh higher-numbered non-probing packet can authorize a switch.

constructor Create(aHost: TsmStreamSecII; aSocket: tAbstractDatagramSocket; const aPeer: tSocketAddress; aVersion: Cardinal; const aInitialDestinationID, aPeerSourceID, aLocalSourceID: TBytes; const aLocalParameters: tQuicTransportParameters; const aStreamBudgets: tQuicStreamBudgets; aAddressValidated: Boolean = False); destructor Destroy; override; procedure ConfigureEarlyData(const aContext: TBytes); property EarlyDataOffered: Boolean read GetEarlyDataOffered; property EarlyDataAccepted: Boolean read GetEarlyDataAccepted; property EarlyDataRejected: Boolean read GetEarlyDataRejected; property EarlyDataWindowOpen: Boolean read GetEarlyDataWindowOpen; procedure Start; procedure StartRefused(aErrorCode, aNowMicros: UInt64);
Send a transport refusal using Initial keys without entering TLS or selecting an application protocol. Address proof/amplification still govern output.
function AcceptsDestinationID(const aID: TBytes): Boolean;
Delegates to fLocalConnectionIDs.Accepts, passing 1 argument(s), and returns its result.
function AcceptsStatelessReset(const aData: TBytes; const aFrom: tSocketAddress): Boolean;
Unknown short-header routing may consult used peer reset tokens. This preview does not authenticate a packet, advance time or close a session.
function ReceiveDatagram(const aData: TBytes; const aFrom: tSocketAddress; aNowMicros: UInt64; aEcn: tDatagramEcn = deUnknown): Boolean; function Flush(aNowMicros: UInt64; aMaxPackets: Integer = 32): Integer; function NextWakeup(out aDeadline: UInt64): Boolean; overload; function NextWakeup(out aDeadline: UInt64; out aPacingProgress: Boolean): Boolean; overload;
Reports the same absolute deadline without advancing caller time. aPacingProgress is true only when the last service attempt sent ordinary in-flight packets and ordinary pacing exclusively selects this deadline. Full description »
procedure Close(aErrorCode: UInt64; const aReason: TBytes; aNowMicros: UInt64; aApplication: Boolean = False); function RequestKeyUpdate(aNowMicros: UInt64): Boolean; procedure PrepareSendWindow(aMaxBytes, aMaxRanges: Integer);
Prepares stream retention and max(256, W div 256) output intervals atomically after handshake but before any application data or empty FIN.
function OpenStream(aUnidirectional: Boolean): UInt64; procedure QueueSend(aStreamID: UInt64; const aData: TBytes; aFin: Boolean); overload;
Queues the whole array and FIN atomically. May retain aData read-only until data/reset acknowledgement or close. No alias may mutate shared elements; the caller may release/rebind its variable. Mutable reuse needs independent storage.
procedure QueueSend(aStreamID: UInt64; const aData: TBytes; aDataOffset, aCount: Integer; aFin: Boolean); overload;
Queues the complete slice and FIN. May retain all of aData read-only; neither party may mutate elements through aliases. The caller may drop or rebind its variable. Physical bounds can require a slice copy. Empty FIN pins no array. Retain for retransmission and data/reset acknowledgement or close. Invalid/blocked admission raises eQuicError.
procedure ResetSend(aStreamID, aError: UInt64); procedure StopReceive(aStreamID, aError: UInt64); function TakeReceived(aStreamID: UInt64; out aData: TBytes; out aFin: Boolean): Boolean; overload; function TakeReceived(aStreamID: UInt64; out aData: TBytes; out aFin, aEarly: Boolean): Boolean; overload; procedure QueueControl(const aFrame: tQuicFrame);
Increase manager receive limits before advertising their exact values.
property TLSConnection: tQuicTLSConnection read fTLS; property Dispatcher: tQuicFrameDispatcher read fDispatch; property Paths: tQuicPathManager read fPaths; property Timers: tQuicLifetime read fTimers; property PeerAddress: tSocketAddress read fPeer; property LocalConnectionIDs: tQuicLocalConnectionIDs read fLocalConnectionIDs; property PeerConnectionIDs: tQuicPeerConnectionIDs read fPeerConnectionIDs; property LastSocketError: Integer read fLastSocketError;