public virtual void SkipBytes(Int32 size)
{
if (size <= 0)
return;
Byte[] lBuffer = new Byte[BUFFER_SIZE];
while (size > 0)
{
// lBytesRead can be 0 if connection is closed
Int32 lBytesRead = Read(lBuffer, 0, size > BUFFER_SIZE ? BUFFER_SIZE : size);
if (lBytesRead == 0)
break;
size -= lBytesRead;
}
}
#endregion