Feature notes: Asynchronous QUIC server and HTTP/3 component
Level: tQuicEncryptionLevel;
Offset: UInt64;
Data: TBytes;
Serialized connection bookkeeping, independent of a socket and TLS engine. InstallKeys is called only after the corresponding packet cipher exists. PacketReceived accepts authenticated packets only; its caller buffers undecryptable packets separately. CanRead also enforces the TLS completion barrier for 1-RTT. The caller owns ACK/recovery state and close timers. Protocol errors enter Closing and raise eQuicTransportError; local API misuse raises eQuicError. Early keys require explicit remembered limits; the TLS bridge supplies the authenticated acceptance decision.
constructor Create(aRole: tQuicRole; const aParameterContext: tQuicTransportParameterContext; aMaxCryptoBufferBytes: Integer = 1048576; aMaxCryptoRanges: Integer = 256; aMaxOutputChunks: Integer = 256);
destructor Destroy; override;
procedure SetParameterContext( const aContext: tQuicTransportParameterContext);
procedure Start;
procedure ConfigureEarlyParameters(const aParameters: tQuicTransportParameters);
procedure SetEarlyDataDecision(aAccepted: Boolean);
procedure DiscardEarlyData;
property EarlyParameters: tQuicTransportParameters read GetEarlyParameters;
property EarlyParametersAvailable: Boolean read fEarlyParametersAvailable;
property EarlyDataOffered: Boolean read fEarlyOffered;
property EarlyDataAccepted: Boolean read fEarlyAccepted;
property EarlyDataRejected: Boolean read fEarlyRejected;
procedure InstallKeys(aLevel: tQuicEncryptionLevel; aIncoming: Boolean);
procedure AdvanceReadLevel(aLevel: tQuicEncryptionLevel);
function KeysAvailable(aLevel: tQuicEncryptionLevel; aIncoming: Boolean): Boolean;
function CanRead(aLevel: tQuicEncryptionLevel): Boolean;
function CanWrite(aLevel: tQuicEncryptionLevel): Boolean;
procedure DiscardKeys(aLevel: tQuicEncryptionLevel);
procedure ReceiveCrypto(aLevel: tQuicEncryptionLevel; aOffset: UInt64; const aData: TBytes);
function TakeCryptoInput(aLevel: tQuicEncryptionLevel): TBytes;
procedure QueueCrypto(aLevel: tQuicEncryptionLevel; const aData: TBytes);
function TakeCryptoOutput(out aChunk: tQuicCryptoChunk): Boolean;
procedure ValidatePeerParameters(const aData: TBytes);
procedure CompleteHandshake(const aApplicationProtocol: TBytes);
procedure ReceiveHandshakeDone;
function AllocatePacketNumber(aLevel: tQuicEncryptionLevel): UInt64;
function ExpectedPacketNumber(aLevel: tQuicEncryptionLevel): UInt64;
procedure PacketSent(aLevel: tQuicEncryptionLevel);
procedure PacketReceived(aLevel: tQuicEncryptionLevel; aPacketNumber: UInt64);
procedure BeginClosing(aErrorCode: UInt64);
procedure PeerClosed(aErrorCode: UInt64);
procedure FinishClose;
property Role: tQuicRole read fRole;
property Phase: tQuicConnectionPhase read fPhase;
property ReadLevel: tQuicEncryptionLevel read fReadLevel;
property HandshakeComplete: Boolean read fHandshakeComplete;
property HandshakeConfirmed: Boolean read fHandshakeConfirmed;
property PeerParametersValidated: Boolean read fPeerParametersValidated;
property PeerParametersAuthenticated: Boolean read GetPeerParametersAuthenticated;
property PeerParameters: tQuicTransportParameters read GetPeerParameters;
property ApplicationProtocol: TBytes read GetApplicationProtocol;
property ErrorCode: UInt64 read fErrorCode;