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 copieslenbytes from offsetinfo->fOffsetof the no copy receive buffer pointed to byinfo->fBufferto the buffer specified bybuf. It returnsfalseif there is more data to be copied, ortrueif the data is exhausted.This function returns
truewhen it has read all of the bytes from the buffer information structure pointed to by theinfoparameter. It returnsfalsewhen there are more bytes still to be read.Use the
OTReleaseBufferfunction to return this structure to the system.SEE ALSO
TheOTBufferDataSizefunction.