pub async fn ws_handler(
    ws: WebSocketUpgrade,
    __arg1: State<Arc<RwLock<AppState>>>
) -> impl IntoResponse
Expand description

Handler for the WebSocket route.

This function upgrades the connection to a WebSocket and handles the socket.

§Arguments

  • ws - The WebSocketUpgrade struct containing the upgrade request.
  • shared_state - The shared state of the server.