public void WriteTo(ref SpanBufferWriter bufferWriter)
 {
     bufferWriter.WriteString(UserId);
     bufferWriter.WriteString(UserName);
     bufferWriter.WriteIPEndPoint(RemoteEndPoint);
     bufferWriter.WriteBytes(Random);
     bufferWriter.WriteVarBytes(PublicKey);
     bufferWriter.WriteUInt8((byte)((IsConnectionOwner ? 1 : 0) | (IsDedicatedServer ? 2 : 0)));
 }
        public void WriteTo(ref SpanBufferWriter bufferWriter)
        {
            bufferWriter.WriteUInt8((byte)Result);
            if (!Success)
            {
                return;
            }

            bufferWriter.WriteIPEndPoint(RemoteEndPoint);
            bufferWriter.WriteString(Code);
        }
Exemplo n.º 3
0
        public void WriteTo(ref SpanBufferWriter bufferWriter)
        {
            bufferWriter.WriteUInt8((byte)Result);
            if (!Success)
            {
                return;
            }

            bufferWriter.WriteString(UserId);
            bufferWriter.WriteString(UserName);
            bufferWriter.WriteString(Secret);
            bufferWriter.WriteUInt8((byte)DiscoveryPolicy);
            bufferWriter.WriteUInt8((byte)InvitePolicy);
            bufferWriter.WriteVarInt(MaximumPlayerCount);
            Configuration.WriteTo(ref bufferWriter);
            bufferWriter.WriteUInt8((byte)((IsConnectionOwner ? 1 : 0) | (IsDedicatedServer ? 2 : 0)));
            bufferWriter.WriteIPEndPoint(RemoteEndPoint);
            bufferWriter.WriteBytes(Random);
            bufferWriter.WriteVarBytes(PublicKey);
        }