Skip to main content

Module connection

Module connection 

Source
Expand description

HTTP/2 connection state machine (RFC 9113 §4, §5, §6) — sans-io.

The Connection consumes inbound bytes and produces outbound bytes + Events; the engine driver owns the socket and forwards between them. No I/O happens here, which keeps the state machines fuzzable and runtime-agnostic (they run inside vane-core workers without a tokio dependency).

Covers: client connection preface, SETTINGS negotiation + ACK, stream lifecycle (idle → open → half-closed → closed), stream-id direction rules, HEADERS + CONTINUATION assembly with HPACK, DATA relay with connection/stream flow-control accounting, WINDOW_UPDATE release, PING/PONG, GOAWAY draining, RST_STREAM, unknown-frame skipping, and uppercase field-name rejection (RFC 9113 §8.2.1).

Modules§

error_code
HTTP/2 error codes (RFC 9113 §7).

Structs§

Connection
HTTP/2 connection state machine (sans-io).
ConnectionConfig
Negotiated connection parameters.
ConnectionError
Connection-level failure: the driver must send a GOAWAY with this code and close.

Enums§

Event
An assembled request/response body chunk or complete set of headers.
Role
Which side of the connection this state machine represents.
StreamState
Per-stream lifecycle state (RFC 9113 §5.1). Per-stream lifecycle state (subset of RFC 9113 §5.1 states tracked by this side of the connection).

Constants§

CLIENT_PREFACE
The HTTP/2 client connection preface (RFC 9113 §3.5).