Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

Asynchronous QUIC server and HTTP/3 component

ASYNCHRONOUS QUIC SERVER
========================

TsmAsyncQUICServer (StreamSec.Mobile.AsyncQUICServer) hosts QUIC applications
on one UDP endpoint. TsmHTTPSv3 (StreamSec.Mobile.HTTPSv3) is its first protocol
plugin. QUIC has its own connection and stream model; it does not use the
TCP/TLS server's application transport or its record layer. The cryptographic
providers and TLS 1.3 handshake implementation are the existing library ones.

The runtime packages contain both components. The matching design package
registers them on the StreamSec Mobile palette. The default reactor is the
platform's native backend. A custom/selected reactor must report datagram
support; activation fails before accepting connections if it cannot do so.
Application protocols are independent of reactor choice.

SETUP
-----

Create the components in the IDE, assign HTTPSv3.Server to AsyncQUICServer,
configure routes or OnRequest, and set the listener's OnConfigureEngine. At
runtime the same sequence is:

    lServer := TsmAsyncQUICServer.Create(Self);
    lHttp := TsmHTTPSv3.Create(Self);
    lHttp.Server := lServer;
    lHttp.OnRequest := HandleRequest;
    lServer.OnConfigureEngine := ConfigureQuicIdentity;
    lServer.BindIP := '0.0.0.0';
    lServer.BindPort := 443;
    lServer.Active := True;

The application's methods have these signatures:

    procedure ConfigureQuicIdentity(Sender: TObject;
      aEngine: TsmSimpleTLSInternalServer);
    procedure HandleRequest(Sender: TObject;
      const aRequest: iHttpRequest; const aResponse: iHttpResponse);

The configuration callback runs once on the activation caller, before
TLSSetupServer and before the socket starts accepting packets. Import the certificate chain
and private key using the existing engine APIs, for example ImportFromPFX with
a tDualSecretKey password. Configure certificate policy and client-certificate
requirements there too. Loading RootCerts can request client authentication:
set Options.RequestClientCertificate and RequireClientCertificate deliberately.
The listener calls TLSSetupServer after this callback returns.

ALPN is the exact byte token supplied by each registered plugin. There is no
fallback when the peer offers no registered token. TsmHTTPSv3 registers h3.
Assign component associations and limits before activation; the registry is
frozen while active. DFM forward references and either component declaration
order are supported. Protocols.AddProtocol also accepts a separately retained
iQuicAppProtocol implementation for another QUIC application.

Use one TsmAsyncTLSServer for TCP and one TsmAsyncQUICServer for UDP. Both can
listen on port 443. Associate TsmHTTPSv1dot1 and TsmHTTPSv2 with the same TLS
server; ALPN selects between them. Associate TsmHTTPSv3 with the QUIC server.
For clients without ALPN, explicitly choose HTTP/1.1 fallback with
Http11.IsFallbackProtocol := True and AsyncTLS.FallbackPolicy := fbpUseFallback;
the default fallback policy refuses such connections. All three HTTP plugins
use the existing handler contracts and can share one router:

    Http11.Server := AsyncTLS;
    Http2.Server := AsyncTLS;
    Http3.Server := AsyncQUIC;
    Http11.AddEvent('/api/status', HandleStatus);
    Http2.Router := Http11.Router;
    Http3.Router := Http11.Router;

Configure handlers/routes before activation. A session provider can also be
shared across all three. Connection sessions remain per connection; use the
shared provider for application sessions that must survive a change of
connection/protocol. Handlers may be called concurrently on different
connections. They receive the same iHttpRequest/iHttpResponse contracts.

HTTP/1.1 and HTTP/2 can advertise this HTTP/3 endpoint automatically:

    Http11.AltSvc.Source := Http3;
    Http11.AltSvc.Origin := 'https://www.example.com';
    Http11.AltSvc.Enabled := True;
    Http2.AltSvc.Assign(Http11.AltSvc);

AltSvc is disabled by default. Configure it before activating the TCP server.
Origin explicitly authorizes one HTTPS origin, without a path. The default
PublicPort = 0 uses the actual bound UDP port, including an ephemeral port.
For NAT/public port translation, set PublicPort to the actual public UDP port.
MaxAge defaults to 60 seconds and accepts 0..86400. The alternative uses the
origin's hostname; cross-host alternatives and HTTP/2 ALTSVC frames are not
part of this integration. An Alt-Svc response header works on both TCP wires.

Enabling the mapping asserts that public routing, certificates and application
content serve that origin. Local readiness cannot establish Internet/firewall
reachability. The TCP server can remain active while QUIC starts and stops.
Successful startup publishes readiness after bind/reactor/timer startup; failure,
endpoint closure, drain and component destruction withdraw it. A matching
request then receives h3=":<port>"; ma=<seconds>, or clear while unavailable.
Each response samples retained endpoint state after application dispatch.

Source component removal clears the displayed association while retaining an
unavailable detached endpoint, so later matching responses can withdraw the
mapping. Explicit Source reassignment/nil while TCP is inactive replaces that
configuration. Disabled/incomplete mappings and other origins add no field.
Every handler-supplied Alt-Svc field, including clear, repeats or an empty
value, takes precedence and remains unchanged.

Already sent/queued fields cannot be recalled. Clients that do not receive a
later clear can retain the old mapping until MaxAge expires. Withdraw while
TCP still serves the old origin before removing its mapping. Manual Alt-Svc
headers remain available for application policies outside this automatic scope.

LISTENER SETTINGS AND LIFETIME
------------------------------

WorkerThreadCount defaults to 2 and accepts 1..64 while inactive, independently
of IOThreadCount. Connection workers run serialized connection turns. The timer
selects published ready/due work and queues at most one turn per connection;
it does not run application callbacks or read response sources. The dispatch
queue holds at most MaxConnections plus WorkerThreadCount entries.

Known-connection UDP input is retained without additional payload copies in a
bounded per-connection queue: 32 datagrams and 256 KiB, with a 16 MiB listener
aggregate. The datagram being processed remains charged. Excess UDP input is
dropped; receiving it does not return stream credit. IngressDropCount counts
these refusals for the activation, and each connection reports its own
through the optional iQuicAppTransportIngress. A turn processes at most
16 datagrams per service pass, all of them before the pass drives the
connection once: timers, stream callbacks, Writable and output follow the
batch, not each datagram. An active connection can retain its dispatch
reservation for at most sixteen immediately due passes, starting no additional
pass after 1 ms. The native connection lock is released between passes. Queued
competitors and draining/closing connections yield; future deadlines wait on
the timer. The time budget is checked between passes and cannot preempt a user
callback. Existing transport memory and flow limits apply independently. Queueing does not consume work or move an absolute deadline.
Completion and queue-capacity notifications retain pending work and earlier
deadlines without interrupting the timer for ordinary idle completions or
dequeues. Worker availability is counted per queued turn, avoiding broadcast
wakeups for a single turn. Active workers drain available in-memory permits;
native notifications wake only registered idle workers. Their credits remain
reserved until a waiter claims them, including the interval before it sleeps.
The 50 ms maintenance cap and protocol timeout budgets remain.

The executor isolates the timer from selected callbacks and source reads.
Callbacks must still be bounded: blocked user operations occupy workers, and
exhausting the pool can delay connection service. Transport processing runs
on the same workers, so while every worker is blocked no connection progresses.

BindIP defaults to 0.0.0.0, BindPort to 443 and IOThreadCount to 2. BindPort 0
asks the OS for a port; BoundAddress reports the actual bound address while
active. MaxConnections defaults to 1024, MaxHandshakes to 128 and
HandshakeTimeoutMS to 10000. IdleTimeoutMS defaults to 30000; zero disables the
local idle-timeout offer, while the peer's negotiated timeout still applies.
Settings and registry membership require an inactive listener, except Filter
and OnPeerRefused (see PEER FILTER).

HTTP/3 SendWindowBytes (TsmHTTPSv3.Limits) bounds physical send allocations
retained until ACK or reset acknowledgement, shared by all streams on a
connection. Default 65536; range 16384..3145728 (one 16 KiB source piece
through the built-in 4 MiB pool minus its initial 1 MiB receive credit).
MaxBufferedSendBytes separately bounds queued HTTP framing; increasing that
alone cannot raise QUIC throughput. The send ceiling is W bytes per round
trip: 65536 at 50 ms is 1.31 MB/s; 262144 at 50 ms is 5.24 MB/s.

MEMORY BUDGET: a peer granting tiny credit and selectively acknowledging can
force one retained range per byte. Send ranges measure 32 bytes on Win32 and
40 on Win64; pending output stream intervals are 32 on both (CRYPTO intervals
16). Steady send storage can reach W + W*SizeOf(tSendRange) +
max(256,W div 256)*32, including empty FIN intervals. Copy-on-change arrays
can temporarily double descriptor storage and fragmentation costs quadratic
CPU. Multiply by MaxConnections for the listener, plus receive/HTTP/TLS and
separately bounded CRYPTO/control storage. 65536 is deliberately modest: a
slow connection is the visible cost; a high default would let any peer pin
large memory/metadata per connection. Raise SendWindowBytes only with a
lower MaxConnections and an explicit process memory budget. No protocol rule
chooses 65536 over another modest reservation. It is a defensive default.

RequireRetry defaults to True. RetryTokenLifetimeMS defaults to 10000. Tokens
authenticate the peer address and port, QUIC version, original destination CID
and Retry CID, and expire relative to this activation's monotone clock.
Invalid tokens allocate no TLS connection. Disabling Retry still enforces the
QUIC address-validation amplification limit. Initial datagrams must contain at
least 1200 bytes; packets within a coalesced datagram are processed separately.
Malformed later bytes cannot undo an already authenticated earlier packet.
Unknown-packet replies are bounded and rate limited. Reset tokens are derived
with a separate domain from Retry tokens and CID authentication.

The initial path policy uses 1200-byte UDP payloads and disables active
migration. Passive rebinding is admitted only after handshake confirmation and
validated with path challenges; rollback and previous-path checks remain in
the QUIC connection driver. Larger PMTU and active migration are later policy
work.

ECN (Explicit Congestion Notification, RFC 9000 section 13.4). On activation
TsmAsyncQUICServer has its socket read the ECN field of every datagram it
receives. Each connection reports those markings in its ACK frames, and marks
what it sends ECT(0): ten test packets first, then every packet once the
client's reported counts confirm them, and Not-ECT for the rest of the path if
they do not. A network that reports congestion with CE marks then slows the
connection as a loss would, without the loss. There is no setting: where the
system cannot read the ECN field, the connections report nothing; where it
cannot set the field, they send Not-ECT; either way they run as before.
tQuicClient does the same. Marked packets leave in the same send batches as
unmarked ones. The library's datagram sockets and the reactor behind the
listener do ECN on Windows, Linux, Android, macOS and iOS.

The QUIC client and server use NewReno with send-utilization accounting across
packet-number spaces. Short application/flow-limited bursts do not grow the
congestion window. Busy output remains eligible despite pacing delays, socket
backpressure or a finite caller burst budget. ACKs release flight immediately;
undecided growth credit waits for utilization proof and is discarded on loss,
validated ECN, path changes or key-space discard. No application setting is
required; stream flow control and listener admission limits remain independent.

Active := False closes admission and begins application drain. TsmHTTPSv3 sends
GOAWAY and retains requests it has already processed. The host waits for the
plugin's queued responses, transport send ranges and response FIN acknowledgements
before closing, subject to ShutdownTimeoutMS (default 3000). Zero requests
immediate teardown. The deadline also bounds the close/draining period. A peer
that does not acknowledge cannot keep shutdown pending indefinitely.

The optional iQuicAppTransportStreamBudget.RequestDrain requests the same
ACK-aware drain for just one connection, without closing admission or stopping
other connections. Its deadline is the listener's ShutdownTimeoutMS. Successful
close is protocol-neutral: iQuicAppSessionDrainClose supplies the error code
and whether it is an application close. HTTP/3 supplies H3_NO_ERROR (0x100),
including on listener shutdown (RFC 9114 section 5.2). Plugins without that
companion, including Snip, retain transport NO_ERROR.

Stop the listener from an owning/application thread, then release components.
Freeing an associated HTTP/3 plugin stops the listener before unregistering it.
Do not activate, destroy or reconfigure components inside their callbacks.
Connection callbacks run on connection workers, serialized for each connection.
Final shutdown cleanup may invoke Closed on the owning caller after workers
have joined. Different connections can invoke the same application handler
concurrently. Callback threads have no fixed connection affinity.
Marshal UI updates to the UI thread and keep handlers bounded. ShutdownTimeoutMS
bounds the drain grace period; callbacks must return before worker threads can
be joined safely. It cannot forcibly interrupt a blocked handler. The application
owns synchronization and shutdown of its other callers and callback targets.

OnHandshakeDone receives an authenticated iQuicAppTransport. OnConnectionClosed
reports the last validated peer address and QUIC/application error code. The
transport's RemoteAddress follows the current validated path. Both strings are
address only: dotted IPv4 or unbracketed IPv6 (including ::ffff:a.b.c.d for mapped
addresses), never a port. BoundAddress is a structured address and port.
ConnectionCount includes
connections still handshaking or draining. LastError records the most recent
unexpected endpoint exception; LastConnectionError records a handled connection
exception. Empty strings do not certify that a peer completed a handshake.
IngressDropCount is the number of datagrams that per-connection ingress queues
refused for their slot, byte or aggregate bound; datagrams for closed
connections are not counted.
These diagnostics and BoundAddress belong to the current activation and are
empty after deactivation. Protocol errors are primarily reported by close codes.

PEER FILTER
===========

Filter: iPeerFilter and OnPeerRefused use the same policy and event type as
TsmAsyncTLSServer. nil preserves unrestricted address and registered-ALPN
admission. Both properties may change while active; each operation retains a
synchronized snapshot. Manage the lifetime of event targets until callbacks
using the old target have finished.

Assign ONE filter instance to the TCP and QUIC hosts to share rules, activity
windows and temporary blocks per address. tPeerFilter serializes internally.
The application supplies each address or CIDR range separately with Deny,
Allow or RestrictToken. It parses its own comma lists or mask configuration;
the component does not parse application configuration text.

For an unknown, syntactically valid Initial that fits the admission bounds,
ScreenPeer sees the bare AddressText before Retry construction and before
connection allocation. A refusal silently drops that datagram, spends no
stateless-reply budget, allocates no connection and calls OnPeerRefused outside
listener-wide locks. Such a source is UNPROVEN AND SPOOFABLE. Forged sources
and repeated datagrams can cause an event per datagram; keep handlers cheap and
throttle logging in the application. These events run on I/O threads. A refusal
on validated rebinding runs on the connection worker.

The host reports ONE activity unit per new connection once its address is
proven: at admission with a valid Retry token, or, without Retry, at the first
authenticated Handshake packet that validates the active path. Initials alone,
including retransmissions, never count. A proven connection counts even if its
ALPN or later handshake fails. ReportPeerActivity(address, units), default one
unit, lets protocols account for finer application work; without a filter it
does nothing. Rebinding does not count another connection unit.

Before TLS starts, PermitsToken(address, token) removes forbidden ALPN tokens
from that entry's list, preserving registry priority. RestrictToken('snip',
'192.0.2.0/24'), for example, limits snip to that network while leaving h3 open.
The private-use 'snip' ALPN is shared by Snip over TCP and QUIC. A token with
no source rules remains open. No permitted token means CONNECTION_CLOSE with
CRYPTO_ERROR no_application_protocol (0x178), using Initial keys without
entering TLS or inheriting any engine-seeded protocol. The selected token is
checked again before CreateSession, including resumed/early-data handshakes;
refusal uses 0x178 and creates no session or early application work.

A validated passive rebind to a DIFFERENT IP is screened again with ScreenPeer
and PermitsToken for the connection's selected token. Refusal closes with
CONNECTION_REFUSED (0x02), calls OnPeerRefused with the new bare address and
dispatches no application input after that switch. Candidate-path validation
never holds application input. If validation is abandoned, the connection
keeps its old validated path and raises no refusal event. Only a validated
active-IP switch invokes the filter; an unvalidated source is not an identity.
A port-only change keeps the address identity and is not screened again.

APPLICATION PROTOCOL CONTRACT
------------------------------

StreamSec.Quic.AppProtocol declares the separate QUIC plugin interfaces.
iQuicAppProtocol exposes Token, Description and CreateSession. The host creates
the session only after authenticated ALPN, peer transport parameters and
application keys are available. The session receives Opened, StreamData,
StreamReset, StreamStopped, Writable and Closed. FIN, reset and STOP_SENDING
have separate meanings. Stream callbacks follow each service pass's input
batch, not each datagram, and Writable comes once per pass. Closed occurs
once; retained transport interfaces are detached and refuse new work after
teardown.

iQuicAppTransport opens streams, queues Send ranges/FIN, exposes current
SendCapacity, grants explicit Consume credit and provides ResetSend,
StopReceive, Close and ExportKeyingMaterial. A successful Send means that QUIC
accepted the range into its bounded queue, not that the peer acknowledged it.
Writable is a scheduling opportunity, not an acknowledgement callback.
ConnectionInfo can be queried for the existing iTLSConnectionInfo interface.

TBytes parameters passed as const are shared read-only arrays. Compiler-managed
reference counting permits a session to retain a received array. Neither party
may modify its elements through another alias; copy before mutation. Send
may retain the complete input allocation even for a partial range; its method
comment specifies the retained read-only contract. Physical bounds may require
copying just the selected slice. ACK trimming does not copy the remaining data,
and a backing allocation stays charged until its last fragment retires. Array
lifetime does not grant receive credit: Consume returns only bytes already delivered and not
previously consumed. Reset final-size credit is accounted separately. Function
results and out values, including empty buffers, are assigned explicitly.

Received CRYPTO and stream bytes reassemble by geometric growth that keeps the
physical buffer within twice the live bytes and copies each byte O(1) times
amortized; the post-handshake (1-RTT) CRYPTO buffer is capped outright, and the
retained receive-range count is bounded both per stream and per connection.
Fragmented or reordered delivery cannot inflate reassembly memory or the range
metadata beyond these bounds.
Optional iQuicAppTransportWork and iQuicAppSessionWork schedule owner callbacks
and absolute application deadlines in stTlsUtils.GetTickCount64 milliseconds.
SetWorkDeadline(0) clears the slot. A session publishes its earliest surviving
deadline again after every WorkQueued callback. RequestWork and SetWorkDeadline
only schedule; neither calls into the session. WorkQueued follows on a
connection worker - when RequestWork was called from a callback, possibly the
same worker, in the same connection turn.

The optional iQuicAppTransportIngress reports IngressDropCount for this
connection: the datagrams its bounded ingress queue refused. Reading it takes
no connection lock, so a callback of the same connection may still be running;
a detached transport reports zero.

Optional iQuicAppTransportBufferPolicy.PrepareReceiveReserve(W) prepares a
physical retained-send cap and reserves already granted receive credit in
the shared pool, before any application STREAM byte or FIN. It atomically
prepares max(256,W div 256) pending output intervals, including empty FINs:
256 at 64 KiB, 1024 at 256 KiB, 4096 at 1 MiB and 12288 at 3 MiB. Tiny
selective-ACK holes beyond this bound fail only that connection with an
internal error recorded in LastConnectionError; the listener and other
connections continue serving. Copy-on-change arrays make tiny holes costly:
visible low performance is preferable to a per-peer CPU lever. Packet-sized
loss within the window fits comfortably. CRYPTO and control budgets stay
independent. Generic plugins that
never prepare keep their 256 interval / 256 control defaults. A failed call
changes neither policy. HTTP/3 passes Limits.SendWindowBytes before SETTINGS;
an offered policy that refuses closes with H3_INTERNAL_ERROR and a reason
naming the window. A transport without the companion retains legacy complete
handler behaviour; streaming still requires guaranteed receive reserve. See
the listener memory/throughput budget above before increasing W.

An optional iQuicAppSessionReceiveStarted receives StreamReceiveStarted once
for an explicitly materialized receive stream before ordered data/reset. The
timestamp records first owner observation, including reassembly holes; skipped
implicit IDs produce no callback. Merely opening a local bidirectional stream
without peer input does not start observation. TsmHTTPSv3 uses this companion
to protect incomplete headers before contiguous bytes exist. Its finite header
and buffered-request budgets are documented in HTTP.txt section 20.4.

An optional iQuicAppSessionDrain exposes BeginDrain and Drained. Report Drained
only after application output has entered QUIC. The host then checks outstanding
transport data and FIN acknowledgements. A session without this interface is
closed directly during shutdown. iQuicAppProtocolComponent is the component
binding hook used to resolve form-streaming order before activation.

STREAM BUDGETS AND RETIREMENT
-----------------------------

InitialMaxStreamsBidi is the initial cumulative client-bidi grant (1000 by
default, range 1..1000, inactive only, outside the published surface). Match
TsmHTTPSv3.Limits.MaxRequests to it. The optional
iQuicAppTransportStreamBudget reads the cumulative peer-opened count and
current grant, including skipped IDs; IncreaseStreamBudget accepts an absolute
larger value up to 2^60 under the entry lock, queues a retransmittable bidi
MAX_STREAMS and wakes output. It refuses a grant unless every unused or skipped
ID can still materialize within the fixed record ceiling. HTTP/3 renews an old
block at its last allowed stream, or sends GOAWAY and requests per-connection
drain for a young block or insufficient record room. See HTTP.txt section 20.2
for MaxRequests and MinRequestBlockAgeMSec (default 60000, equality is young).

Stream-budget queries are available only while the session's connection is
active. After Close, GetStreamBudget returns False with zero outputs and
IncreaseStreamBudget returns False, including inside the closing callback.
Retirement and drain-readiness checks stop when a callback closes the
connection; the protocol close code is preserved without a host error.

Initial and Handshake loss/PTO recovery retransmits retained CRYPTO without
requiring application stream state. Application-space recovery consults the
active stream manager to suppress retransmission for retired streams.

The shared cQuicServerStreamRecordCeiling is 2048. A full 1000-request next
block therefore fits while a browser still has 100 requests active at the
boundary, together with critical streams and outstanding uni-stream credit.
Reservation counts unused and skipped IDs without allocating their records;
QUIC objects, host notices and HTTP records allocate only as streams materialize.
A peer that pins enough records to prevent reserving the whole next block
still gets GOAWAY regardless of block age.

Fixed request-record storage measured with Delphi 13 (Win32 / Win64 bytes):
  QUIC stream object                         156 / 176
  host notice                                 24 / 24
  HTTP/3 stream object                       332 / 424
  frame reader                                60 / 80
  empty request-body stream                   24 / 48
  reader's 8-byte buffer and array header      16 / 24
  QUIC and HTTP record-array pointers          8 / 16
  QUIC lookup slots at the ceiling              8 / 8
  total per materialized request             628 / 800

At the ceiling, worst-case steady fixed record storage is 1286144 / 1638400
bytes per connection (about 1.23 / 1.56 MiB), plus 32 / 64 bytes for the four
shared array headers. Multiply by the listener's MaxConnections: at its default
1024, about 1.23 / 1.56 GiB for these records alone. This is not a total process
memory bound: add allocator overhead, transient array resizing, retired-range
storage and the separate receive, send, HTTP, QPACK and TLS budgets. Configure
MaxConnections against that total. Empty body streams allocate no body buffer;
payload and range allocations are charged to their respective budgets.

The 2048-entry ceiling bounds live/retained records plus sparse retired ranges.
After transport completion, the optional iQuicAppSessionRetirement releases
application references outside session turns. Retirement requires a terminal,
delivered and consumed receive side (or delivered reset with final size known),
an acknowledged send FIN or RESET, and no application, streaming or QPACK
reference. The manager compacts live records, lookup indices, service cursors
and the host's notices together; HTTP/3 releases the matching engine record.
Scans walk live records only. Per stream type, a contiguous retired floor and
bounded sparse ranges remember closed IDs irreversibly. Late STREAM,
RESET_STREAM, STOP_SENDING and MAX_STREAM_DATA for a retired ID are ignored,
cannot reopen it and never change final-size accounting; an ID above the grant
still raises STREAM_LIMIT_ERROR. Unretired skipped IDs remain usable. Drain
waits for implicitly opened gaps too, subject to its shutdown bound.

EXPLICIT EARLY-DATA ACCEPTANCE
------------------------------

QUIC 0-RTT is disabled by default. TsmHTTPSv3.EnableEarlyData explicitly opts
its application context into ticket issuance and acceptance. TLS must also
permit early data with an atomic single-use ticket store and replay approval.
Every registered application protocol must implement iQuicAppProtocolEarlyData
and return a nonempty stable context; the combined token/context snapshot is
bounded to cQuicAppMaxEarlyDataContext (32768 bytes). A missing or oversized
snapshot disables early data while ordinary connections and resumption remain
available. Configuration changes that no longer match the issued snapshot
refuse early data. Context callbacks describe configuration only; they must
not create sessions or perform request-side effects.

Opting-in protocols must create sessions implementing iQuicAppSessionEarlyData.
Its StreamDataEarly callback receives authenticated early stream bytes and FIN
after Opened. Without that companion, accepted early input fails closed. The
ordinary StreamData callback retains 1-RTT semantics. All session delivery,
including early delivery, waits for completed authenticated TLS and peer
transport parameters; there are no pre-authentication session/request callbacks.
Existing finite transport, stream and listener budgets also apply to 0-RTT.

HTTP policy remains a separate decision: EarlyDataPolicy defaults to edpRefuse.
The common safe-method/explicit-dispatch rules, unconditional 425/no-store for
requests crossing the early/1-RTT boundary, and streaming refusal are described
in HTTP.txt sections 2.1 and 23.4. Refusal precedes session-provider, body-factory
and handler side effects. Method safety alone does not establish replay safety.

The low-level tHttp3QuicClient provides explicit buffered early admission from
an authenticated ticket/transport/settings snapshot. Rejection fails admitted
requests with retry disabled and restores fresh connection state; it never
automatically replays a request or calls a producer again. A caller can decide
whether to start a new operation after authentication. Callbacks must return
normally for subsequent notifications to run. The common high-level HTTPS
client continues to use authenticated admission; discovery does not enable
early requests automatically.

OPTIONAL SERVER PUSH
--------------------

Deprecated. Server push is provided for completeness of RFC 9114 only. It
remains an optional part of HTTP/3, but no browser accepts it and widely used
HTTP/3 servers do not send it, so do not build new designs on it. To have a
browser fetch related resources early, send Link preload headers on the
ordinary response instead.

Push remains disabled by default. Set HTTPSv3.Limits.MaxPushes (0..1024), and
prepare authorized same-origin GET resources through the optional
iHttpResponsePush response companion in inline handlers. The client must
separately grant IDs. MaxActivePushes defaults to 8, MaxPushBufferedBytes to
262144 and PushTimeoutMSec to 10000; all three require positive values.
Response sources and memory share the existing connection/plugin budgets.
Pending stream credit expires absolutely; enabled push requires owner timer
scheduling even with ordinary input deadlines disabled. HTTP.txt section 23.6
covers lifetime, privileges, cancellation, drain and client acceptance. The
high-level HTTPS client continues to refuse push.

SCOPE
-----

HTTP.txt documents TsmHTTPSv3's common handler API, limits and HTTP/3 behavior.
Static and opt-in dynamic QPACK, ordinary request/response streams, streaming
bodies/trailers and explicit buffered 0-RTT admission are supported. Configure
TsmHTTPSv3.Limits.QpackTableCapacity (default 0, at most 1 MiB),
QpackBlockedStreams (default 0, at most MaxActiveRequests) and
MaxQpackBlockedBytes (default 256 KiB, positive) before activation. HTTP.txt
section 23.5 describes blocked-input bounds, absolute deadlines and compression
context policy. Table and blocked-input limits apply per connection; size the
listener connection admission for the aggregate memory budget. CONNECT tunnels
are not supported.

Record-free TLS 1.3 and the QUIC packet/TLS bridge have been qualified with
FPC 3.3.1 on native Linux64 and big-endian MIPS/o32 under QEMU in WSL. Full
public FPC server qualification remains incomplete because of separate
backend and runtime limitations. The FPC build excludes legacy DES imports;
DES/3DES is not required by TLS 1.3 or QUIC. FPC stDES support for legacy
encrypted files remains a separate backlog item. Intentional linking of the
remaining TLS providers is preserved.