MCPcopy Index your code
hub / github.com/socketio/socket.io / _remove

Method _remove

lib/client.ts:187–197  ·  view source on GitHub ↗

* Removes a socket. Called by each `Socket`. * * @private

(
    socket: Socket<ListenEvents, EmitEvents, ServerSideEvents, SocketData>
  )

Source from the content-addressed store, hash-verified

185 * @private
186 */
187 _remove(
188 socket: Socket<ListenEvents, EmitEvents, ServerSideEvents, SocketData>
189 ): void {
190 if (this.sockets.has(socket.id)) {
191 const nsp = this.sockets.get(socket.id)!.nsp.name;
192 this.sockets.delete(socket.id);
193 this.nsps.delete(nsp);
194 } else {
195 debug("ignoring remove for %s", socket.id);
196 }
197 }
198
199 /**
200 * Closes the underlying connection.

Callers 2

_oncloseMethod · 0.45
_cleanupMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected