public Packet(PacketHead head) { this.head = (PacketHead)head.Clone(); this.data = new byte[this.head.length]; }
public Packet(PacketHead head, byte[] packetData) { this.head = (PacketHead)head.Clone(); this.data = new byte[this.head.length]; Buffer.BlockCopy(packetData, 0, this.data, 0, this.head.length); }