/// <summary> /// Retrieves information about the lobby /// </summary> public void GetLobbyInfo(int lobbyId, LobbyInfoCallback callback, IClientSocket connection) { connection.SendMessage((short)MsfOpCodes.GetLobbyInfo, lobbyId, (status, response) => { if (status != ResponseStatus.Success) { callback.Invoke(null, response.AsString("Unknown error")); return; } var memberData = response.Deserialize(new LobbyDataPacket()); callback.Invoke(memberData, null); }); }
/// <summary> /// Retrieves information about the lobby /// </summary> public void GetLobbyInfo(int lobbyId, LobbyInfoCallback callback, ErrorCallback errorCallback) { Client.SendMessage((ushort)OpCodes.GetLobbyInfo, lobbyId, (status, response) => { if (status != ResponseStatus.Success) { errorCallback.Invoke(response.AsString("Unknown error")); return; } var memberData = response.Deserialize <LobbyDataPacket>(); callback.Invoke(memberData); }); }