public object Clone() { var clone = new SocketHeader(); clone.length = length; clone.msg = msg; return(clone); }
public SocketPacket(SocketHeader header, byte [] packetData) { this.header = (SocketHeader)header.Clone(); this.body = new byte[this.header.length]; Buffer.BlockCopy(packetData, 0, this.body, 0, this.header.length); }
public SocketPacket(SocketHeader header) { this.header = (SocketHeader)header.Clone(); this.body = new byte[this.header.length]; }