Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

StreamSec.Quic.Crypto

Feature notes: Asynchronous QUIC server and HTTP/3 component

Classes, interfaces and records

classtQuicCryptoBuffer

One instance reassembles one encryption level's CRYPTO flow. Calls require external serialization. Pending data consists of sorted, coalesced ranges; holes consume no byte storage. Limits count unique pending bytes and ranges, including contiguous bytes not yet taken. A connection must support at least 4096 out-of-order bytes as required by RFC 9000 section 7.5.

Insert copies new bytes and never modifies an input array. Matching overlap is accepted; conflicting bytes still buffered raise PROTOCOL_VIOLATION. Already consumed bytes are ignored. Offset, conflict and resource failures leave the buffer unchanged. Replacement allocations are bounded by one additional copy of the configured byte and range budgets.

constructor Create(aMaxBufferBytes, aMaxRanges: Integer); procedure Insert(aOffset: UInt64; const aData: TBytes); function TakeContiguous: TBytes;
Returns all bytes contiguous with ConsumedOffset and advances that offset. A hole or empty buffer explicitly returns an empty array. Returned bytes remain stable across later operations and may be retained as read-only.
procedure Clear;
Drops pending bytes and resets the flow offset to zero. The connection must stop using a discarded encryption level before clearing its flow.
property ConsumedOffset: UInt64 read fConsumedOffset; property PendingByteCount: Integer read fPendingByteCount; property RangeCount: Integer read GetRangeCount; property MaxBufferBytes: Integer read fMaxBufferBytes; property MaxRanges: Integer read fMaxRanges; property BytesCopied: Int64 read fBytesCopied;
Diagnostics: cumulative bytes this buffer has allocated or moved while reassembling. A quadratic insert path drives it toward the square of the pending size; an amortized path keeps it linear in the bytes buffered.

Routines