MCPcopy
hub / github.com/socketio/socket.io / sockets

Method sockets

packages/socket.io-adapter/lib/in-memory-adapter.ts:263–271  ·  packages/socket.io-adapter/lib/in-memory-adapter.ts::Adapter.sockets

* Gets a list of sockets by sid. * * @param {Set<Room>} rooms the explicit set of rooms to check.

(rooms: Set<Room>)

Source from the content-addressed store, hash-verified

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.

Callers 2

index.tsFile · 0.80
allSocketsMethod · 0.80

Calls 2

applyMethod · 0.95
addMethod · 0.45

Tested by

no test coverage detected