Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

StreamSec.Quic.Congestion

Feature notes: Asynchronous QUIC server and HTTP/3 component

Classes, interfaces and records

classtQuicRttEstimator

One serialized instance estimates one path. The caller supplies elapsed microseconds only for RFC 9002 section 5.1 eligible ACKs: the ACK's largest packet is newly acknowledged and some newly acknowledged packet elicited an ACK. Initial and Handshake ACK delays are ignored. Application delays are uncapped before confirmation and capped afterwards. MinRtt is raw, never adjusted by a peer's delay. Reset is for a new path, not each PTO.

constructor Create; procedure Reset; procedure Sample(aElapsedMicros, aAckDelayMicros, aMaxAckDelayMicros: UInt64; aSpace: tQuicPacketSpace; aHandshakeConfirmed: Boolean); procedure PersistentCongestion; function LossDelay: UInt64; function PtoBase(aAckDelayMicros: UInt64): UInt64;
The caller includes the peer's maximum ACK delay only where required. Exponential PTO backoff and persistent-congestion multiplication belong to recovery. Arithmetic saturates instead of wrapping a timer early.
property HasSample: Boolean read fHasSample; property LatestRtt: UInt64 read fLatestRtt; property MinRtt: UInt64 read fMinRtt; property SmoothedRtt: UInt64 read fSmoothedRtt; property RttVariance: UInt64 read fRttVariance;

classtQuicNewReno

One serialized controller accounts for all packet-number spaces of one path. Packet lengths include QUIC headers and authentication overhead, exclude IP/UDP headers, and cannot exceed 65527 bytes. In-flight means an ack-eliciting packet or one containing PADDING. ACK-only packets do not consume credit. Recovery calls each terminal accounting method once; a late ACK of an already lost packet uses aInFlight=False. CanSend is a congestion check, not a reservation. PTO probes bypass that check but PacketSent still adds their load. The caller separately enforces amplification, flow-control and pacing or burst limits. Explicit limited ACKs retire flight without growing the congestion window. No timer expiry alone declares loss or reduces the congestion window.

constructor Create(aMaxDatagramSize: UInt64 = 1200); procedure SetMaxDatagramSize(aMaxDatagramSize: UInt64);
Authenticated PMTU changes preserve flight and the current rate budget; only the mandatory two-datagram floor can raise the current window.
procedure Reset; function CanSend(aByteLen: UInt64; aProbe: Boolean = False; aPendingBytes: UInt64 = 0): Boolean;
aPendingBytes: in-flight packets granted but not yet reported by PacketSent, counted as in flight.
procedure PacketSent(aByteLen: UInt64; aInFlight: Boolean); procedure PacketAcknowledged(aSentMicros, aByteLen: UInt64; aInFlight, aAppOrFlowLimited: Boolean); function RetireAcknowledgedPacket(aSentMicros, aByteLen: UInt64; aInFlight: Boolean): Boolean;
Retirement returns whether this new ACK passes the recovery cutoff. Deferred utilization credit uses the separate bounded growth operation; it must not retire the same flight twice.
procedure CreditAcknowledgedBytes(aByteLen: UInt64); procedure ClearAcknowledgedCredit; procedure PacketsLost(aLostByteLen, aNewestSentMicros, aNowMicros: UInt64);
Lost and discarded byte lengths are aggregates of still-in-flight packets. Discarding old keys subtracts flight without declaring loss.
procedure CongestionEvent(aSentMicros, aNowMicros: UInt64);
This accepts a loss or already validated ECN signal. ECN validation is the caller's responsibility; raw peer counters are not trusted here.
procedure PacketSpaceDiscarded(aByteLen: UInt64); procedure PersistentCongestion; property MaxDatagramSize: UInt64 read fMaxDatagramSize; property InitialWindow: UInt64 read fInitialWindow; property MinimumWindow: UInt64 read fMinimumWindow; property CongestionWindow: UInt64 read fCongestionWindow; property SlowStartThreshold: UInt64 read fSlowStartThreshold; property BytesInFlight: UInt64 read fBytesInFlight; property RecoveryStartTime: UInt64 read fRecoveryStartTime; property HasRecoveryStart: Boolean read fHasRecoveryStart; property GrowthGeneration: UInt64 read fGrowthGeneration; property State: tQuicCongestionState read GetState;

Types (enumerations, sets, aliases)

enumtQuicCongestionState

  tQuicCongestionState = (qcsSlowStart, qcsRecovery, qcsAvoidance);

Routines