pub async fn ws_handler<T>(socket: WebSocket, hub: WsHub<T>)Expand description
One connected WebSocket. Spawn from your axum handler:
ⓘ
ws.on_upgrade(move |socket| ws_handler(socket, hub.clone()))The future runs until the client disconnects, the keepalive ping fails, or the broadcast channel is exhausted.