Loading...
Loading...
A cheap, cloneable handle over the framework's keyed connection store. Reach it anywhere via sockets; it is also injectable as a #[ossido::ws] (or #[handler]/#[api]/#[action]) parameter. Store a socket with SocketManager::store under any Key (a u64 user id, a String room name, a custom enum, ...), then look connections back up with SocketManager::get and send on the returned SocketGroup.
The keyed connection store. `store(key, socket)` indexes a live socket under any `Key` and returns a `Connection`; `get(&key)` returns the `SocketGroup` stored there; `broadcast(&ev)` sends to every live connection; `count()` reports the total. Reach it anywhere via `sockets()`, or inject it as a handler parameter.