socketioxide 0.17.2

Socket IO server implementation in rust as a Tower Service.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Get all the rooms selected with the previous operators.

This will return a `Future` that must be awaited because socket.io may communicate with remote instances
if you use horizontal scaling through remote adapters.

# Example
```rust
# use socketioxide::{SocketIo, extract::SocketRef};
async fn handler(socket: SocketRef, io: SocketIo) {
    println!("Socket connected to the / namespace with id: {}", socket.id);
    let rooms = io.rooms().await.unwrap();
    println!("All rooms in the / namespace: {:?}", rooms);
}

let (_, io) = SocketIo::new_svc();
io.ns("/", handler);
```