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