Skip to main content

Module runtime

Module runtime 

Source
Expand description

Per-connection wiring — the part every #[socket_controller] shares. Port of runSocketControllers.ts.

Structs§

HandshakeEntry
A handshake middleware, built from the connection’s container so it can depend on request-scoped things.
SocketEventEntry
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§

SocketEventFn
Deserialize + validate + dispatch + ack, all inside the closure the macro emits. The socket is Option because a test drives the same closure without a live connection — see AckSink for the other half of that. A handler that asked for a SocketRef and gets None reports it rather than pretending.