Expand description
Caller-side handshake engine — draft-sharabayko-srt-01 §4.3.1
(Caller-Listener Handshake), Caller role.
CallerHandshake is a driveable, sans-IO state machine:
CallerHandshake::start returns the INDUCTION handshake bytes to send;
CallerHandshake::feed consumes an inbound (already-parsed)
ControlPacket and returns the HandshakeOutputs produced — further
bytes to send, the negotiated parameters on success, or a rejection. No
sockets, no clock: retransmit timing is driven by
CallerHandshake::tick calls from the caller.
Flow implemented (§4.3.1.1 / §4.3.1.2):
start(): send INDUCTION (Version 4, Encryption Field 0, Extension Field 2, SYN Cookie 0).feed()the Listener’s INDUCTION response: validate Version 5 and the SRT magic code0x4A17, capture the cookie and Listener’s Socket ID, then send CONCLUSION (Version 5, the captured cookie, HSREQ + optional Stream ID / Group extensions).feed()the Listener’s CONCLUSION response: validate it, decode its Handshake Extension Message, and reachCallerHandshakeState::ConnectedwithNegotiatedParams— orCallerHandshakeState::Rejectedon any validation failure or explicit peer rejection.
Structs§
- Caller
Handshake - A driveable Caller-side SRT handshake (
draft-sharabayko-srt-01§4.3.1).
Enums§
- Caller
Handshake State - Caller-side handshake lifecycle state (
draft-sharabayko-srt-01§4.3.1).