protected override byte[] BuildPacket(Packet packet)
        {
            var result = new byte[6 + packet.GetSize() + 4]; // header + packet + checksum
            result[0] = 0x88;
            System.Buffer.BlockCopy(BitConverter.GetBytes(result.Length), 0, result, 1, sizeof(int));
            packet.Build(ref result, 6);

            return result;
        }
Beispiel #2
0
 private byte[] BuildPacket(Packet packet)
 {
     byte[] buffer = new byte[6 + packet.GetSize() + 4];
     buffer[0] = 136;
     System.Buffer.BlockCopy(BitConverter.GetBytes(buffer.Length), 0, buffer, 1, 4);
     packet.Build(ref buffer, 6);
     return buffer;
 }