/// <summary> /// Connect to the selected steam lobby /// On successful connection, starts a new FacepunchP2PClient for connection to the lobby owner's FacepunchP2PServer /// </summary> private async Task ConnectToLobby() { RoomEnter roomEnter = await lobbyToJoin.Join(); if (roomEnter != RoomEnter.Success) { BMSLog.Log("Error connecting to lobby returned: " + roomEnter.ToString()); return; } this.lobby = lobbyToJoin; ConnectToServer(lobbyToJoin.Owner.Id); }
private async Task JoinLobby(Steamworks.Data.Lobby lobbyToJoin) { RoomEnter roomEnter = await lobbyToJoin.Join(); if (roomEnter != RoomEnter.Success) { BMSLog.Log("Error connecting to lobby returned: " + roomEnter.ToString()); return; } this.lobby = lobbyToJoin; BMSLog.Log("Connected to lobby, owner.Id = " + lobbyToJoin.Owner.Id.Value); ConnectToHost(lobbyToJoin.Owner.Id, null); }