InetFlush Function  
 
INT WINAPI InetFlush(
  SOCKET hSocket  
);

The InetFlush function flushes the internal send and receive buffers used by the socket.

Parameters

hSocket
The socket handle.

Return Value

If the function succeeds, the return value is zero. If the function fails, the return value is INET_ERROR. To get extended error information, call InetGetLastError.

Remarks

The InetFlush function will flush any data waiting to be read or written to the remote host . It is important to note that this function 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 InetWrite or prior to calling InetDisconnect.

An application never needs to use InetFlush under normal circumstances. This function 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 File: cswsock11.h
Import Library: cswskv11.lib

See Also

InetIsReadable, InetIsWritable, InetPeek, InetRead, InetWrite