public EPacket(byte[] data, PacketFlags flags = PacketFlags.None) { if (data == null) { throw new ArgumentNullException("data"); } this.packet = NativeMethods.EnetPacketCreate(data, (uint)data.Length, flags); if (this.packet == IntPtr.Zero) { throw new EException("Packet creation call failed"); } }