Important: The information in this document is obsolete and should not be used for new development.
OTReadBuffer
Copies data out of a no-copy receive buffer.C INTERFACE
Boolean OTReadBuffer(OTBufferInfo* info, void* buf, size_t* len);C++ INTERFACE
None. C++ applications use the C interface to this function.PARAMETERS
- info
- A pointer to the buffer information structure to be read.
buf
- A pointer to a buffer into which to copy the data.
len
- The number of bytes to copy.
- function result
- See Discussion.
DISCUSSION
This function copieslen
bytes from offsetinfo->fOffset
of the no copy receive buffer pointed to byinfo->fBuffer
to the buffer specified bybuf
. It returnsfalse
if there is more data to be copied, ortrue
if the data is exhausted.This function returns
true
when it has read all of the bytes from the buffer information structure pointed to by theinfo
parameter. It returnsfalse
when there are more bytes still to be read.Use the
OTReleaseBuffer
function to return this structure to the system.SEE ALSO
TheOTBufferDataSize
function.