Expand description
WebSocket boundary: upgrade, per-socket read/write pumps, event dispatch.
This is the only module that touches axum::extract::ws — the analogue of
crate::web::boundary for the real-time layer. Everything above it speaks
arcly types (WsClient, WsMessage, GatewayRuntime).
§Per-connection model (no hot-path locks)
┌─────────────────── handle_socket task ───────────────────┐
socket ──>│ reader: stream.next() ─> dispatch(event) ─> handler fut │
│ writer: rx.recv() ─> sink.send(frame) │
└───────────────────────────────────────────────────────────┘The reader and writer run as independent halves of the split socket. Inbound
frames are parsed and routed through the gateway’s dispatch table (an
immutable &HashMap — lock-free read). Outbound frames are produced by any
task via the registry’s sharded channels and drained by this socket’s writer.
Structs§
- WsTuning
- Per-gateway runtime tuning, sourced from
LaunchConfigat mount time.
Functions§
- ws_
route - Build the axum
MethodRouterthat upgrades HTTP→WebSocket for one gateway.