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

Method addSockets

packages/socket.io-adapter/lib/in-memory-adapter.ts:303–307  ·  packages/socket.io-adapter/lib/in-memory-adapter.ts::Adapter.addSockets

* Makes the matching socket instances join the specified rooms * * @param opts - the filters to apply * @param rooms - the rooms to join

(opts: BroadcastOptions, rooms: Room[])

Source from the content-addressed store, hash-verified

301 * @param rooms - the rooms to join
302 */
303 public addSockets(opts: BroadcastOptions, rooms: Room[]): void {
304 this.apply(opts, (socket) => {
305 socket.join(rooms);
306 });
307 }
308
309 /**
310 * Makes the matching socket instances leave the specified rooms

Callers 3

onMessageFunction · 0.80
addSocketsFunction · 0.80
socketsJoinMethod · 0.80

Calls 2

applyMethod · 0.95
joinMethod · 0.45

Tested by

no test coverage detected