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

Method delAll

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

* Removes a socket from all rooms it's joined. * * @param {SocketId} id the socket id

(id: SocketId)

Source from the content-addressed store, hash-verified

136 * @param {SocketId} id the socket id
137 */
138 public delAll(id: SocketId): void {
139 if (!this.sids.has(id)) {
140 return;
141 }
142
143 for (const room of this.sids.get(id)) {
144 this._del(room, id);
145 }
146
147 this.sids.delete(id);
148 }
149
150 /**
151 * Broadcasts a packet.

Callers 2

index.tsFile · 0.80
leaveAllMethod · 0.80

Calls 1

_delMethod · 0.95

Tested by

no test coverage detected