Пример #1
0
        public object Clone()
        {
            var clone = new SocketHeader();

            clone.length = length;
            clone.msg    = msg;
            return(clone);
        }
Пример #2
0
 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);
 }
Пример #3
0
 public SocketPacket(SocketHeader header)
 {
     this.header = (SocketHeader)header.Clone();
     this.body   = new byte[this.header.length];
 }