Esempio n. 1
0
    public byte[] Serialize()
    {
        List <byte> list = new List <byte>();

        list.AddRange(ByteSerializer.SerializeInt((int)this.action));
        list.AddRange(ByteSerializer.SerializeInt(this.userCap));
        list.AddRange(ByteSerializer.SerializeBool(this.acceptingConnections));
        list.AddRange(ByteSerializer.SerializeString(this.newPassword));
        list.AddRange(ByteSerializer.SerializeInt((int)this.lobbyMode));
        return(list.ToArray());
    }
Esempio n. 2
0
    public byte[] Serialize()
    {
        List <byte> list = new List <byte>();

        list.AddRange(ByteSerializer.SerializeInt((int)this.action));
        list.AddRange(ByteSerializer.SerializeByteArray(this.content));
        list.AddRange(ByteSerializer.SerializeString(this.username));
        list.AddRange(ByteSerializer.SerializeString(this.metadata));
        list.AddRange(ByteSerializer.SerializeBool(this.playSound));
        return(list.ToArray());
    }
Esempio n. 3
0
    public byte[] Serialize()
    {
        List <byte> list = new List <byte>();

        list.AddRange(ByteSerializer.SerializeInt(this.userCount));
        list.AddRange(ByteSerializer.SerializeInt(this.userCap));
        list.AddRange(ByteSerializer.SerializeBool(this.acceptingConnections));
        list.AddRange(ByteSerializer.SerializeInt((int)this.lobbyMode));
        list.AddRange(ByteSerializer.SerializeBool(this.isFrozen));
        list.AddRange(ByteSerializer.SerializeStrings(this.playerNames));
        return(list.ToArray());
    }