Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

StreamSec.Mobile.AsyncQUICServer

Feature notes: TLS implementation notes (RFC map) · Asynchronous QUIC server and HTTP/3 component

Classes, interfaces and records

classeQuicAsyncServer

inherits from Exception

(no public members)

classTsmAsyncQUICServer — component reference

inherits from TComponent

constructor Create(aOwner: TComponent); override; destructor Destroy; override; procedure CheckInactive;
Raises eQuicAsyncServer unless the listener is inactive. The setters of this component and of TsmHTTPSv3 call it. » member page
property InitialMaxStreamsBidi: Integer read fInitialMaxStreamsBidi write SetInitialMaxStreamsBidi;
Initial cumulative client-bidi grant, range 1..1000, default 1000. Match TsmHTTPSv3.Limits.MaxRequests to this first block. Inactive only; kept outside the published surface for specialized hosts and tests. » member page
property Protocols: iQuicAppProtocolRegistry read fProtocols;
The protocols served, one per ALPN token. TsmHTTPSv3 adds itself; call AddProtocol only for an iQuicAppProtocol of your own. Changes raise while the listener is active. » member page
property Filter: iPeerFilter read GetFilter write SetFilter;
May change while active, as on the TLS host. Each operation retains a synchronized snapshot. nil admits every address and registered token. » member page
property OnPeerRefused: tAsyncTLSPeerRefusedEvent read GetOnPeerRefused write SetOnPeerRefused;
Refused Initial sources are unproven and may be forged. This event can fire per datagram: keep handlers cheap and throttle application logging. Runs outside listener-wide locks; may change while active. » member page
procedure ReportPeerActivity(const aPeer: string; aUnits: Integer = 1);
One connection unit is automatic after address proof, not per Initial. Applications can report additional work. No-op without a filter. » member page
property Availability: iQuicServerAvailability read fAvailability;
Whether, and on which UDP port, each registered protocol is being served. TsmHTTPSv3.AltSvcEndpoint reads it for Alt-Svc; applications rarely need it. » member page
property BoundAddress: tSocketAddress read GetBoundAddress;
The address actually bound while active (with BindPort 0, the port the OS chose); all zero while inactive. » member page
property ConnectionCount: Integer read GetConnectionCount;
Diagnostics of the current activation; 0 or '' while inactive. ConnectionCount includes connections still handshaking or draining. IngressDropCount counts datagrams dropped because a connection's input queue, or the listener's total for all of them, was full. LastError is the last unexpected exception on the endpoint, LastConnectionError the last one handled for a connection. » member page
property IngressDropCount: Int64 read GetIngressDropCount; property LastError: string read GetLastError; property LastConnectionError: string read GetLastConnectionError; property Active: Boolean read GetActive write SetActive default False;
True: calls OnConfigureEngine, binds BindIP:BindPort and starts the threads; if any step fails it raises and the listener stays inactive. Full description »
property BindIP: string read fBindIP write SetBindIP;
The local address and UDP port (defaults 0.0.0.0 and 443). BindPort 0 lets the OS choose; BoundAddress then reports the port. » member page
property BindPort: Word read fBindPort write SetBindPort default 443; property IOThreadCount: Integer read fIOThreadCount write SetIOThreadCount default 2;
Thread counts, 1..64 each. IOThreadCount threads receive datagrams; WorkerThreadCount threads do all connection processing and run the callbacks, so each blocked handler takes one out of service. » member page
property WorkerThreadCount: Integer read fWorkerThreadCount write SetWorkerThreadCount default 2; property ReactorKind: tReactorKind read fReactorKind write SetReactorKind stored StoreReactorKind;
The I/O backend; the default is the platform's native one. Activation raises if the selected reactor cannot serve datagrams. » member page
property MaxConnections: Integer read fMaxConnections write SetMaxConnections default 1024;
Admission bounds, 1..65536: all connections, and connections still in their handshake. At either bound, new connections are not admitted. » member page
property MaxHandshakes: Integer read fMaxHandshakes write SetMaxHandshakes default 128; property HandshakeTimeoutMS: Integer read fHandshakeTimeoutMS write SetHandshakeTimeoutMS default 10000;
HandshakeTimeoutMS (1..3600000): a connection still in its handshake this long after it arrived is closed. IdleTimeoutMS (0..86400000): the idle timeout offered to clients; 0 offers none, the client's own then applies. ShutdownTimeoutMS (0..60000): how long Active := False waits for connections to drain; 0 closes them at once. » member page
property IdleTimeoutMS: Integer read fIdleTimeoutMS write SetIdleTimeoutMS default 30000; property ShutdownTimeoutMS: Integer read fShutdownTimeoutMS write SetShutdownTimeoutMS default 3000; property RetryTokenLifetimeMS: Integer read fRetryTokenLifetimeMS write SetRetryTokenLifetimeMS default 10000;
RequireRetry, the default, makes every new client prove its address with a QUIC Retry round trip before any TLS state is allocated for it; the Retry token is valid for RetryTokenLifetimeMS (1..600000). False saves that round trip; the QUIC anti-amplification limit still bounds what an unvalidated address is sent. » member page
property RequireRetry: Boolean read fRequireRetry write SetRequireRetry default True; property OnConfigureEngine: tQuicConfigureEngineEvent read fOnConfigureEngine write SetOnConfigureEngine;
Called on each activation, on the thread setting Active := True, with that activation's new TLS engine. Import the certificate chain and private key here (e.g. ImportFromPFX) and set client-certificate and early-data policy. The listener calls TLSSetupServer when it returns; an exception aborts the activation. » member page
property OnHandshakeDone: tQuicHandshakeEvent read fOnHandshakeDone write SetOnHandshakeDone;
Called on a connection worker once a connection has completed its handshake and its protocol session has opened. aTransport is authenticated; its ConnectionInfo shows what the handshake settled. » member page
property OnConnectionClosed: tQuicClosedEvent read fOnConnectionClosed write SetOnConnectionClosed;
Called once per connection when it ends, also when its handshake failed, after the session's Closed. aErrorCode is the connection's QUIC or application error code. aRemoteAddress is the last validated path's address only, without a port or IPv6 brackets. Exceptions raised here are ignored. » member page

Types (enumerations, sets, aliases)

proctQuicConfigureEngineEvent

  tQuicConfigureEngineEvent = procedure(Sender: TObject;
    aEngine: TsmSimpleTLSInternalServer) of object;

proctQuicHandshakeEvent

  tQuicHandshakeEvent = procedure(Sender: TObject;
    const aTransport: iQuicAppTransport) of object;

proctQuicClosedEvent

  tQuicClosedEvent = procedure(Sender: TObject;
    const aRemoteAddress: string; aErrorCode: UInt64) of object;