Example #1
0
        public Packet(enPacket type)
        {
            packetBuffer = new MemoryStream();
            writer       = new BinaryWriter(packetBuffer);

            writer.Write((byte)type);
        }
Example #2
0
 public Packet(byte[] packet)
 {
     packetBuffer = new MemoryStream(packet);
     reader       = new BinaryReader(packetBuffer);
     PacketType   = (enPacket)reader.ReadByte();
 }