Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Networking With Open Transport / Part 2 - Open Transport Reference
Chapter 28 - Advanced Topics Reference / Functions
/


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 copies len bytes from offset info->fOffset of the no copy receive buffer pointed to by info->fBuffer to the buffer specified by buf. It returns false if there is more data to be copied, or true 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 the info parameter. It returns false when there are more bytes still to be read.

Use the OTReleaseBuffer function to return this structure to the system.

SEE ALSO
The OTBufferDataSize function.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998