Expand description
Backend-side wire handling for broker handoff offers (#354, slice 6).
Given a framed connection to the broker (the same v1 local-socket framing used by every other broker connection), this module:
- reads one
HandoffOfferframe (read_handoff_offer), - validates and consumes the presented one-time token through the
existing
accept_handed_offpath, and - replies with a
HandoffAckframe echoing the token and correlation id (respond_to_handoff_offer).
serve_handoff_offer composes all three for the common case. A
rejected token still produces a well-formed HandoffAck with
accepted = false and the rejection detail, so the broker can fall
back to the reconnect path immediately instead of waiting out its ACK
deadline.
Enums§
- Backend
Handoff Wire Error - Errors surfaced while reading or answering a handoff offer frame.
Functions§
- read_
handoff_ offer - Read and validate one broker→backend
HandoffOfferframe. - respond_
to_ handoff_ offer - Validate/consume one received offer and write the matching
HandoffAck. - serve_
handoff_ offer - Read one offer, validate/consume the token, and reply with the ACK.
- write_
handoff_ ack - Write one backend→broker
HandoffAckframe.