Export (0) Print
Expand All

CArchive::IsBufferEmpty

Call this member function to determine whether the archive object's internal buffer is empty.

BOOL IsBufferEmpty( ) const;

Return Value

Nonzero if the archive's buffer is empty; otherwise 0.

Remarks

This function is supplied to support programming with the MFC Windows Sockets class CSocketFile. You do not need to use it for an archive associated with a CFile object.

The reason for using IsBufferEmpty with an archive associated with a CSocketFile object is that the archive's buffer might contain more than one message or record. After receiving one message, you should use IsBufferEmpty to control a loop that continues receiving data until the buffer is empty. For more information, see the Receive member function of class CAsyncSocket and the MFC Advanced Concepts sample CHATSRVR, which shows how to use IsBufferEmpty.

For more information, see Windows Sockets: Using Sockets with Archives.

See Also

CArchive Overview | Class Members | Hierarchy Chart | CSocketFile | CAsyncSocket::Receive

Show:
© 2014 Microsoft