Feature notes: Asynchronous QUIC server and HTTP/3 component
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);
Optional notification after complete sent-number ACK validation, including ACK-only packets without retained retransmission metadata.
procedure AckFrameValidated(aLevel: tQuicEncryptionLevel; const aFrame: tQuicFrame);
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);
procedure ConfigureStreamLookupKey(aKey: UInt64);
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);
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;
function NextLossTimeout(out aTimer: tQuicRecoveryTimer): Boolean;
function PollLossTimer(aNowMicros: UInt64; out aProbe: tQuicProbeRequest): Boolean;
function TakeLostPacket(out aPacket: tQuicRecoveryPacket): Boolean;
function RetireLostPacket(aSpace: tQuicPacketSpace; aPacketNumber: UInt64): Boolean;
function FirstPendingPacket(aSpace: tQuicPacketSpace; out aPacket: tQuicSentPacket): Boolean;
function AckDue(aLevel: tQuicEncryptionLevel; aNowMicros: UInt64): Boolean;
function BuildAck(aLevel: tQuicEncryptionLevel; aNowMicros: UInt64; out aFrame: tQuicFrame): Boolean;
procedure ResetForRetry(aNowMicros: UInt64);
procedure RejectEarlyData(aNowMicros: UInt64);
procedure ResetForPath(aNowMicros, aMaxDatagramSize: UInt64; aResetCongestion: Boolean);
procedure DiscardData(aNowMicros: UInt64);
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;
function LastAckDelayMicros(aSpace: tQuicPacketSpace): UInt64;
property Streams: tQuicStreamManager read GetStreams;
property Recovery: tQuicRecovery read GetRecovery;
property Ecn: tQuicEcnController read fEcn;