public object Clone() { var clone = new PacketHead(); clone.length = length; clone.msg_id = msg_id; return(clone); }
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); }