Skip to main content

Module handshake

Module handshake 

Source
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§

HandshakeGate
Drives the per-connection handshake state machine.
HandshakeSequenceError
A protocol violation the gate detected outside the handshake itself: a non-handshake frame arriving before handshake completion, a second handshake frame arriving after completion, or a server→client-only frame kind arriving on the server’s INBOUND gate after completion.

Enums§

HandshakeOutcome
The outcome of feeding one frame to HandshakeGate::admit.