Expand description
Per-connection wiring — the part every #[socket_controller]
shares. Port of runSocketControllers.ts.
Structs§
- Handshake
Entry - A handshake middleware, built from the connection’s container so it can depend on request-scoped things.
- Socket
Event Entry - One
#[on_socket_event]method, type-erased.
Constants§
- CONNECTION_
EVENT - The event name that means “the socket just connected” rather than something the client emitted. Matches TS.
Functions§
- parse_
payload - Deserialize + validate an event payload, reporting a bad one the way the client can act on.
- register_
socket_ namespace - Attach one controller’s namespace to
io.
Type Aliases§
- Socket
Event Fn - Deserialize + validate + dispatch + ack, all inside the closure the
macro emits.
The socket is
Optionbecause a test drives the same closure without a live connection — seeAckSinkfor the other half of that. A handler that asked for aSocketRefand getsNonereports it rather than pretending.