Expand description
The server-side handshake state machine (ADR-137, “Shared protocol crate and handshake”).
The ADR requires: “the first application frame on every connection must
be a handshake carrying a protocol version; the answer is
handshake_ack naming the accepted version, or the wire error
unsupported_version followed by connection close, before it accepts
any request or subscription frame.” HandshakeGate is a type the
server side feeds every inbound frame through: it is impossible to
obtain a Frame::Request/Subscribe/etc. admission decision without
having first driven a successful handshake through it, so “no request
frame before handshake completes” is enforced by the gate’s API shape
rather than left to every call site to remember.
Structs§
- Handshake
Gate - Drives the per-connection handshake state machine.
- Handshake
Sequence Error - A protocol violation the gate detected outside the handshake itself:
a non-
handshakeframe arriving before handshake completion, a secondhandshakeframe arriving after completion, or a server→client-only frame kind arriving on the server’s INBOUND gate after completion.
Enums§
- Handshake
Outcome - The outcome of feeding one frame to
HandshakeGate::admit.