public DataPacket SkipSize(UInt32 size, bool reuse = false)
{
if (reuse)
{
DataPacket p = new DataPacket();
p.Sender = this.Sender;
p.Destination = this.Destination;
p.Kind = this.Kind;
p.Chain = this.Chain;
p.bufferSize = BufferSize - (int)size;
p.Offset = Offset + (int)size;
p.Data = Data;
return p;
}
else
{
DataPacket p = DataPacket.Create(BufferSize - (int)size);
p.Sender = this.Sender;
p.Destination = this.Destination;
p.Kind = this.Kind;
p.Chain = this.Chain;
Buffer.BlockCopy(this.Data, (int)size, p.Data, 0, this.BufferSize - (int)size);
return p;
}
}