async fn handle_socket(
socket: WebSocket,
session_manager: Arc<SessionManager>,
requested_session_id: Option<SessionId>,
)Expand description
Function to handle a WebSocket connection.
Each WebSocket connection gets its own session with an isolated background thread. If a session_id is provided and that session exists, the client reconnects to it.