PBCaGw.DataPacket.SkipSize C# (CSharp) Method

SkipSize() public method

Skips a given size from the data block
public SkipSize ( UInt32 size, bool reuse = false ) : DataPacket
size System.UInt32
reuse bool
return DataPacket
        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;
            }
        }