* Removes a socket from all rooms it's joined. * * @param {SocketId} id the socket id
(id: SocketId)
| 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. |