Expand description
Per-link, per-direction PEX state (SPEC §5, §9).
PEX on a link is two independent half-conversations (SPEC §5.1). LinkState holds both for one
link, keyed in the engine by the transport peer_id (never a wire field — SPEC §5.4, §10):
- the sender (outgoing) direction — whether we’ve sent our handshake + snapshot, the per-link
told-state (“what I’ve told you”, SPEC §9.1:
peer_id → advertised-content fingerprint), the send-cadence bookkeeping, and our own (possibly backed-off) declared interval; - the receiver (incoming) direction — the
RecvPhasestate machine, the remote’s declared interval, the last data-message arrival time (for the SPEC §6.4 floor), the strike count + mute flag, and the set ofpeer_ids this link has told us (fordroppedattribution, SPEC §8.3).
All of this dies with the link (SPEC §5.5): a fresh connection restarts from
RecvPhase::AwaitingHandshake with an empty told-state.
Structs§
- Link
State - All PEX state for one link (both directions). Created on
link_up/ first inbound message and discarded onlink_down(SPEC §5.5).
Enums§
- Recv
Phase - The receiver-side state machine for one direction (SPEC §5.3).