Feature notes: Asynchronous QUIC server and HTTP/3 component
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);
function AcceptsDestinationID(const aID: TBytes): Boolean;
function AcceptsStatelessReset(const aData: TBytes; const aFrom: tSocketAddress): Boolean;
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;
procedure Close(aErrorCode: UInt64; const aReason: TBytes; aNowMicros: UInt64; aApplication: Boolean = False);
function RequestKeyUpdate(aNowMicros: UInt64): Boolean;
procedure PrepareSendWindow(aMaxBytes, aMaxRanges: Integer);
function OpenStream(aUnidirectional: Boolean): UInt64;
procedure QueueSend(aStreamID: UInt64; const aData: TBytes; aFin: Boolean); overload;
procedure QueueSend(aStreamID: UInt64; const aData: TBytes; aDataOffset, aCount: Integer; aFin: Boolean); overload;
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);
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;