Function thruster_socketio::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.