disconnect method
Disconnects from the room, notifying server of disconnection.
Implementation
Future<void> disconnect() async {
if (engine.isClosed) {
events.emit(RoomDisconnectedEvent(reason: DisconnectReason.unknown));
return;
}
await engine.disconnect();
await _cleanUp();
}