Expand description
§A tower Layer
for socket.io so it can be used as a middleware with frameworks supporting layers.
§Example with axum :
// Create a socket.io layer
let (layer, io) = SocketIo::new_layer();
// Add io namespaces and events...
let app = axum::Router::<()>::new()
.route("/", get(|| async { "Hello, World!" }))
.layer(layer);
// Spawn axum server
Structs§
- Socket
IoLayer - A
Layer
forSocketIoService
, acting as a middleware.