Expand description
WebSocket client with auto-reconnect, message queueing, and channel mux.
Driven by tick(dt) each frame. Messages arrive as WsEvent values
polled from drain_events(). Send messages with send().
Needs the websocket cargo feature for a real connection (tungstenite,
rustls for wss://).
Auto-reconnect: exponential backoff on disconnect. Message queue: outgoing messages buffered during disconnection. Channels: local labels on outgoing messages (not sent on the wire).
Structs§
- Channel
Config - A logical channel registered with
WsClient::subscribe. - WsClient
- WebSocket client driven by
tick().