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

Method delSockets

packages/socket.io-adapter/lib/in-memory-adapter.ts:315–319  ·  view source on GitHub ↗

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

(opts: BroadcastOptions, rooms: Room[])

Source from the content-addressed store, hash-verified

313 * @param rooms - the rooms to leave
314 */
315 public delSockets(opts: BroadcastOptions, rooms: Room[]): void {
316 this.apply(opts, (socket) => {
317 rooms.forEach((room) => socket.leave(room));
318 });
319 }
320
321 /**
322 * Makes the matching socket instances disconnect

Callers 3

onMessageFunction · 0.80
delSocketsFunction · 0.80
socketsLeaveMethod · 0.80

Calls 2

applyMethod · 0.95
leaveMethod · 0.45

Tested by

no test coverage detected