Expand description
Action dispatch — parses a client action envelope and produces the matching server events.
Each handler is async and forwards events through an
UnboundedSender<serde_json::Value> (the per-connection outbound sink). The
socket task drains the sink and writes each value as a JSON WS text frame, so
streaming actions (send_message) can emit many events while still being
driven from one place.
Functions§
- handle_
frame - Parse and dispatch a single inbound text frame. Any produced events are sent
through
sink. ReturnsOk(())always — protocol-level failures are surfaced aserrorevents, never as hard errors that drop the connection.