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