Get a buffer that covers a specific portion of the packet.
Namespace:
Demo3D.IO
Assembly:
Demo3D.IO (in Demo3D.IO.dll) Version: 10.0.0.0 (10.0.0.0)
Syntaxprotected abstract Buffer GetBuffer(
int offset,
int length,
bool ensure,
bool advance,
bool returnBuffer,
bool read
)
Parameters
- offset
- Type: SystemInt32
The offset into the packet of the start of the buffer. -1 means to use the current packet position. - length
- Type: SystemInt32
The length of the buffer to return. -1 means to return as much buffer as possible. - ensure
- Type: SystemBoolean
True to ensure data/space is available (or throw an exception). - advance
- Type: SystemBoolean
True to move the current packet position to 1 byte after the buffer being returned. - returnBuffer
- Type: SystemBoolean
True to return a buffer, otherwise null is returned. - read
- Type: SystemBoolean
True if the request is to read the buffer, and false to write to the buffer.
Return Value
Type:
BufferThe buffer if
returnBuffer is true, otherwise null.
See Also