MCPcopy Create free account
hub / github.com/Botloader/botloader / ws_handler

Function ws_handler

components/webapi/src/routes/ws.rs:23–25  ·  view source on GitHub ↗
(ws: WebSocketUpgrade, State(state): State<AppState>)

Source from the content-addressed store, hash-verified

21use crate::{app_state::AppState, middlewares::LoggedInSession};
22
23pub async fn ws_handler(ws: WebSocketUpgrade, State(state): State<AppState>) -> impl IntoResponse {
24 ws.on_upgrade(move |socket| handle_socket_upgrade(socket, state))
25}
26
27async fn handle_socket_upgrade(socket: WebSocket, state: AppState) {
28 WsConn::new(socket, state).run().await;

Callers

nothing calls this directly

Calls 1

handle_socket_upgradeFunction · 0.85

Tested by

no test coverage detected