* Close the room and clean up all resources. Disconnects all sessions * and stops background processes.
()
| 209 | * and stops background processes. |
| 210 | */ |
| 211 | close() { |
| 212 | this.disposables.forEach((d) => d()) |
| 213 | this.sessions.forEach((session) => { |
| 214 | session.socket.close() |
| 215 | }) |
| 216 | this._isClosed = true |
| 217 | } |
| 218 | |
| 219 | /** |
| 220 | * Check if the room has been closed and is no longer accepting connections. |