* Removes a socket. Called by each `Socket`. * * @private
(
socket: Socket<ListenEvents, EmitEvents, ServerSideEvents, SocketData>
)
| 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. |