Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

StreamSec.Quic.Scheduling

Feature notes: Asynchronous QUIC server and HTTP/3 component

Classes, interfaces and records

classtQuicPacer

One serialized instance paces one path at congestion-window bytes per smoothed RTT. Times are monotone caller microseconds; zero is valid. The current rate inputs apply to elapsed refill. The bucket initially holds one or two datagrams (the minimum burst). A fixed bucket never accumulates a larger idle burst. A rate-sized bucket (a maximum burst above the minimum) holds what the current rate delivers in cQuicPacerBurstMicros, at least the minimum burst and at most the maximum burst or the initial window, whichever is smaller; credit above the current capacity is not available.

CanSend is a read-only preview. PacketSent commits only actual successful UDP transmission. Failed sends consume no credit. In-flight includes PADDING; ACK-only packets are exempt. Permitted PTO probes bypass this gate, spend credit and retain any excess as debt until refill repays it. The caller separately authorizes finite probes and enforces congestion, amplification and flow control. Arithmetic saturates at UInt64 limits. A PMTU probe may exceed the current datagram size only up to twice that size, within the current bucket capacity. It spends ordinary pacing credit and cannot also request the PTO bypass. No clock, sleep or transport callback is used here.

constructor Create(aMaxDatagramBytes: Integer = 1200; aBurstDatagrams: Integer = 2; aMaxBurstDatagrams: Integer = 0);
aBurstDatagrams (1 or 2) is the minimum burst. aMaxBurstDatagrams from aBurstDatagrams to cQuicPacerMaxBurstDatagrams makes the bucket rate-sized; 0, the default, keeps a fixed bucket of aBurstDatagrams.
procedure SetMaxDatagramBytes(aMaxDatagramBytes: Integer);
Same-path MTU changes preserve pacing debt and time; growth adds no credit, while shrink discards only credit above the largest capacity the new size allows.
function CanSend(aNowMicros, aCongestionWindow, aSmoothedRtt: UInt64; aWireBytes: Integer; aInFlight, aProbe: Boolean; out aDeadline: UInt64; aMtuProbe: Boolean = False; aPendingBytes: UInt64 = 0): Boolean;
aPendingBytes: ordinary in-flight packets granted at aNowMicros but not yet reported by PacketSent; they spend the credit first.
procedure PacketSent(aNowMicros, aCongestionWindow, aSmoothedRtt: UInt64; aWireBytes: Integer; aInFlight, aProbe: Boolean; aMtuProbe: Boolean = False); property MaxDatagramBytes: Integer read fMaxDatagramBytes; property BurstDatagrams: Integer read fBurstDatagrams; property MaxBurstDatagrams: Integer read fMaxBurstDatagrams;