Skip to main content

Module handler

Module handler 

Source
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. Returns Ok(()) always — protocol-level failures are surfaced as error events, never as hard errors that drop the connection.