public void ReadFrom(ref SpanBufferReader bufferReader) { ServerName = bufferReader.ReadString(); UserId = bufferReader.ReadString(); UserName = bufferReader.ReadString(); Secret = bufferReader.ReadString(); Password = bufferReader.ReadString(); CurrentPlayerCount = bufferReader.ReadVarInt(); MaximumPlayerCount = bufferReader.ReadVarInt(); DiscoveryPolicy = (DiscoveryPolicy)bufferReader.ReadByte(); InvitePolicy = (InvitePolicy)bufferReader.ReadByte(); Configuration = new GameplayServerConfiguration(); Configuration.ReadFrom(ref bufferReader); Random = bufferReader.ReadBytes(32).ToArray(); PublicKey = bufferReader.ReadVarBytes().ToArray(); }
public override void ReadFrom(ref SpanBufferReader bufferReader) { Result = (ResultCode)bufferReader.ReadUInt8(); if (!Success) { return; } UserId = bufferReader.ReadString(); UserName = bufferReader.ReadString(); Secret = bufferReader.ReadString(); DiscoveryPolicy = (DiscoveryPolicy)bufferReader.ReadByte(); InvitePolicy = (InvitePolicy)bufferReader.ReadByte(); MaximumPlayerCount = bufferReader.ReadVarInt(); Configuration = new GameplayServerConfiguration(); Configuration.ReadFrom(ref bufferReader); var flags = bufferReader.ReadByte(); IsConnectionOwner = (flags & 1) > 0; IsDedicatedServer = (flags & 2) > 0; RemoteEndPoint = bufferReader.ReadIPEndPoint(); Random = bufferReader.ReadBytes(32).ToArray(); PublicKey = bufferReader.ReadVarBytes().ToArray(); }