Skip to main content

ws_handler

Function ws_handler 

Source
pub(crate) async fn ws_handler(
    __arg0: State<Arc<SessionManager>>,
    __arg1: Query<WsQueryParams>,
    ws: WebSocketUpgrade,
) -> impl IntoResponse
Expand description

WebSocket handler to upgrade the connection and handle messages.

Accepts an optional session_id query parameter to reconnect to an existing session. Example: ws://localhost:45127/ws?session_id=123