Expand description
The live WebSocket cable server: an axum ws upgrade handler that speaks the
ActionCable wire protocol, a ChannelRegistry routing subscriptions to
Channel handlers, a heartbeat ping loop, and a pub/sub bridge so
broadcasts reach subscribed clients.
Structs§
- Channel
Registry - Maps ActionCable channel names to their handlers, over a shared pub/sub backend (Rails’ channel routing).
Functions§
- handle_
socket - Drive a single upgraded WebSocket connection: greet with
welcome, ping on a heartbeat, and dispatch inbound ActionCable frames until the socket closes. - route
- A
Routermounting the cable endpoint at/cable, backed byregistry. - ws_
handler - axum handler that upgrades a request to a cable WebSocket connection.