pub async fn ws_handler(
ws: WebSocketUpgrade,
__arg1: State<Arc<WebSocketState>>,
) -> ResponseExpand description
Handles the WebSocket upgrade request.
This function is an Axum handler that takes a WebSocketUpgrade and
a WebSocketState, then upgrades the connection to a WebSocket and
spawns a task to handle the socket.
§Arguments
ws- TheWebSocketUpgradeextractor.State(state)- The sharedWebSocketState.
§Returns
An Axum Response.