public override void Deserialize(BinaryReader reader) { // base.Deserialize(reader); // MessageID = reader.Read <MessageId>(); // reader.ReadBytes(3); StatusCode = reader.Read <MediusCallbackStatus>(); MediusWorldID = reader.ReadInt32(); PlayerCount = reader.ReadUInt16(); MaxPlayers = reader.ReadUInt16(); GameWorldCount = reader.ReadUInt16(); reader.ReadBytes(2); SecurityLevel = reader.Read <MediusWorldSecurityLevelType>(); GenericField1 = reader.ReadUInt32(); GenericField2 = reader.ReadUInt32(); GenericField3 = reader.ReadUInt32(); GenericField4 = reader.ReadUInt32(); GenericFieldLevel = reader.Read <MediusWorldGenericFieldLevelType>(); LobbyName = reader.ReadString(Constants.LOBBYNAME_MAXLEN); EndOfList = reader.ReadBoolean(); reader.ReadBytes(3); }
public Channel(MediusCreateChannelRequest request) { Id = IdCounter++; ApplicationId = request.ApplicationID; Name = request.LobbyName; Password = request.LobbyPassword; SecurityLevel = string.IsNullOrEmpty(Password) ? MediusWorldSecurityLevelType.WORLD_SECURITY_NONE : MediusWorldSecurityLevelType.WORLD_SECURITY_PLAYER_PASSWORD; MaxPlayers = request.MaxPlayers; GenericField1 = request.GenericField1; GenericField2 = request.GenericField2; GenericField3 = request.GenericField3; GenericField4 = request.GenericField4; GenericFieldLevel = request.GenericFieldLevel; }
public override void Deserialize(BinaryReader reader) { // base.Deserialize(reader); // SessionKey = reader.ReadString(MediusConstants.SESSIONKEY_MAXLEN); reader.ReadBytes(2); ApplicationID = reader.ReadInt32(); MaxPlayers = reader.ReadInt32(); LobbyName = reader.ReadString(MediusConstants.LOBBYNAME_MAXLEN); LobbyPassword = reader.ReadString(MediusConstants.LOBBYPASSWORD_MAXLEN); GenericField1 = reader.ReadUInt32(); GenericField2 = reader.ReadUInt32(); GenericField3 = reader.ReadUInt32(); GenericField4 = reader.ReadUInt32(); GenericFieldLevel = reader.Read <MediusWorldGenericFieldLevelType>(); }