Пример #1
0
 public Packet(byte[] data, PacketFlags flags = PacketFlags.None)
 {
     if (data == null)
     {
         throw new ArgumentNullException("data");
     }
     this.packet = NativeMethods.enet_packet_create(data, (uint)data.Length, flags);
     if (this.packet == IntPtr.Zero)
     {
         throw new ENetException(0, "Packet creation call failed.");
     }
 }