* Gets a list of sockets by sid. * * @param {Set<Room>} rooms the explicit set of rooms to check.
(rooms: Set<Room>)
| 261 | * @param {Set<Room>} rooms the explicit set of rooms to check. |
| 262 | */ |
| 263 | public sockets(rooms: Set<Room>): Promise<Set<SocketId>> { |
| 264 | const sids = new Set<SocketId>(); |
| 265 | |
| 266 | this.apply({ rooms }, (socket) => { |
| 267 | sids.add(socket.id); |
| 268 | }); |
| 269 | |
| 270 | return Promise.resolve(sids); |
| 271 | } |
| 272 | |
| 273 | /** |
| 274 | * Gets the list of rooms a given socket has joined. |
no test coverage detected