The Flush method flushes the internal send and receive
buffers used by the socket.
Parameters
None.
Return Value
If the method succeeds, the return value is non-zero. If the method
fails, the return value is zero. To get extended error
information, call GetLastError.
Remarks
The Flush method will flush any data waiting to be read or
written to the remote host . It is important to note that this method
is not similar to flushing data to a disk file; it does not ensure
that a specific block of data has been written to the socket. For
example, you should never call this function immediately after
calling the Write method or prior to calling the
Disconnect method.
An application never needs to use the Flush method under
normal circumstances. This method is only to be used when the
application needs to immediately return the socket to an inactive
state with no pending data to be read or written. Calling this
function may result in data loss and should only be used if you
understand the implications of discarding any data which has been
sent by the remote host.
Requirements
Minimum Desktop Platform: Windows 7 (Service Pack 1)
Minimum Server Platform: Windows Server 2008 R2 (Service Pack 1)
Header: Include cswsock10.h
Import Library: cswskv10.lib
See Also
IsReadable,
IsWritable, Read,
Write
|