Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

StreamSec.Quic.Transport

Feature notes: Asynchronous QUIC server and HTTP/3 component

Classes, interfaces and records

interfaceiQuicFrameHandler

The host implements CID/path semantics and recovery metadata retirement. Callbacks run synchronously and must not reenter the dispatcher or change its borrowed connection. TLS input is drained only after ReceivePayload returns, so key installation/discard cannot interrupt a frame batch.

procedure ControlFrame(aLevel: tQuicEncryptionLevel; const aFrame: tQuicFrame); procedure PacketAcknowledged(aLevel: tQuicEncryptionLevel; const aPacket: tQuicSentPacket; const aAck: tQuicFrame); procedure PacketSpaceDiscarded(aSpace: tQuicPacketSpace);

interfaceiQuicAckObserver

Optional notification after complete sent-number ACK validation, including ACK-only packets without retained retransmission metadata.

procedure AckFrameValidated(aLevel: tQuicEncryptionLevel; const aFrame: tQuicFrame);

classtQuicFrameDispatcher

Serialized authenticated-plaintext dispatch. The connection is borrowed and must outlive this object. Const payloads are retained read-only until acknowledgement or permanent key discard; no alias may modify their bytes. The host owns packet protection, UDP size checks, CID/path management, packet scheduling, close timers, path validation and pacing. ECN validation uses actual metadata supplied by that host. Recovery tracks this path across all packet-number spaces. Loss reports identify data to reconsider, never authorize blind replay of an old packet. Use the current stream/control/CRYPTO state to build a new packet number. Supply full protected QUIC packet lengths for exact congestion accounting; zero aWireBytes keeps the payload-only estimate of earlier callers. App/flow-limited sends must be marked explicitly. Probe bypass is bounded by the latest PTO request and still requires ack-eliciting packets. PacketSent records actual transmission, using a number allocated by the connection. Stream credit is increased explicitly before advertising it. BuildAck leaves the trigger pending until a covering ACK is actually sent. An ACK frame carries the newest cQuicAckFrameMaxRanges ranges; a sent frame covers when it covers what BuildAck would build. PacketSent saves each sent ACK frame's Largest Acknowledged; a validated peer ACK of such a packet prunes the receive history (RFC 9000 section 13.2.4), and a trigger with nothing left to acknowledge is cleared. Configure the ACK range budget to fit the path packet budget; packet assembly must account for encoded ranges and protection overhead. Provisional stream state is bounded by remembered early-data limits. Application delivery remains behind authenticated handshake completion.

constructor Create(aConnection: tQuicConnectionState; const aLocalParameters: tQuicTransportParameters; const aStreamBudgets: tQuicStreamBudgets; const aHandler: iQuicFrameHandler = nil; aMaxPacketFrames: Integer = 65527; aMaxSentPackets: Integer = 4096; aMaxAckRanges: Integer = 256; aMaxHistoryRanges: Integer = 1024; aMaxRetainedBytes: Integer = 16777216; aMaxRecoveryPackets: Integer = 12288; aMaxDatagramSize: UInt64 = 1200); destructor Destroy; override; procedure ConfigureSendWindow(aMaxBytes: Integer);
Configure the optional client send policy before stream materialization.
procedure ConfigureStreamLookupKey(aKey: UInt64);
Keys the stream-ID lookup of every stream manager this dispatcher creates, including one recreated after early-data rejection. Owners pass a random value before stream materialization; see tQuicStreamManager.SetLookupKey.
function ReceivePayload(aLevel: tQuicEncryptionLevel; aPacketNumber: UInt64; const aPayload: TBytes; aNowMicros: UInt64; aEcn: tDatagramEcn = deUnknown): tQuicPacketReceipt; procedure PacketSent(aLevel: tQuicEncryptionLevel; aPacketNumber: UInt64; const aPayload: TBytes; aSentMicros: UInt64; aWireBytes: UInt64 = 0; aAppOrFlowLimited: Boolean = False; aProbe: Boolean = False; aMtuProbe: Boolean = False; aPathProbe: Boolean = False; aEcn: tDatagramEcn = deNotEct); procedure SetEcnAvailable(aAvailable: Boolean);
The host supplies genuine socket marking/receive capability. Call when activating a path; path failures can be retested on a capable new path.
procedure SetMaxDatagramSize(aMaxDatagramSize: UInt64); procedure SetPathState(aPeerAddressValidated, aAmplificationBlocked: Boolean; aNowMicros: UInt64); function CanSend(aLevel: tQuicEncryptionLevel; const aPayload: TBytes; aWireBytes: UInt64; aProbe: Boolean = False; aPathProbe: Boolean = False; aPendingInFlight: UInt64 = 0): Boolean;
aPendingInFlight: in-flight packets granted but not yet reported by PacketSent, counted as in flight by the congestion check.
function NextLossTimeout(out aTimer: tQuicRecoveryTimer): Boolean; function PollLossTimer(aNowMicros: UInt64; out aProbe: tQuicProbeRequest): Boolean; function TakeLostPacket(out aPacket: tQuicRecoveryPacket): Boolean;
Drain after frame/timer processing. Metadata is shared read-only and can be superseded by later delivery or control-state changes.
function RetireLostPacket(aSpace: tQuicPacketSpace; aPacketNumber: UInt64): Boolean;
Retire an old loss association only after transferring/satisfying its recovery obligations. This does not signal stream delivery or credit.
function FirstPendingPacket(aSpace: tQuicPacketSpace; out aPacket: tQuicSentPacket): Boolean;
Read-only PTO candidate, before still-needed frame filtering.
function AckDue(aLevel: tQuicEncryptionLevel; aNowMicros: UInt64): Boolean; function BuildAck(aLevel: tQuicEncryptionLevel; aNowMicros: UInt64; out aFrame: tQuicFrame): Boolean; procedure ResetForRetry(aNowMicros: UInt64);
Retry retains the borrowed TLS/core packet-number state and sent history, but resets recovery, flight accounting and ACK timers without loss.
procedure RejectEarlyData(aNowMicros: UInt64);
Cancel rejected early streams without resetting the shared application packet-number allocator, sent history or later 1-RTT flight.
procedure ResetForPath(aNowMicros, aMaxDatagramSize: UInt64; aResetCongestion: Boolean);
Retain the connection, packet numbers, sent history and streams. Old flight becomes recoverable data without a congestion loss event.
procedure DiscardData(aNowMicros: UInt64);
Terminal cleanup keeps the borrowed core for close protection only. Subsequent close packets bypass delivery/recovery metadata.
procedure DiscardPathProbes(aNowMicros: UInt64); function NextAckTimeout(aNowMicros: UInt64; out aDeadline: UInt64): Boolean; overload; function NextAckTimeout(aLevel: tQuicEncryptionLevel; aNowMicros: UInt64; out aDeadline: UInt64): Boolean; overload; procedure Synchronize; function PendingSentPackets(aSpace: tQuicPacketSpace): Integer; function ReceivedRangeCount(aSpace: tQuicPacketSpace): Integer;
Retained receive ranges, of which an ACK frame carries the newest.
function LastAckDelayMicros(aSpace: tQuicPacketSpace): UInt64; property Streams: tQuicStreamManager read GetStreams; property Recovery: tQuicRecovery read GetRecovery; property Ecn: tQuicEcnController read fEcn;
Borrowed diagnostics and host metadata policy; externally serialized.

Routines