handle_io

Function handle_io 

Source
pub async fn handle_io<T: Context + SocketIOContext + Default>(
    context: T,
    handler: fn(SocketIOSocket) -> Pin<Box<dyn Future<Output = Result<SocketIOSocket, ()>> + Send>>,
) -> MiddlewareResult<T>
Expand description

Handles any incoming socket.io requests for a particular context by using the passed in handler.

Defaults to a maximum message capacity of 16. If there are more connections, then messages can (and will!) be dropped.