BOOL WINAPI InetIsReadable( |
|
SOCKET hSocket, |
|
|
DWORD dwTimeout, |
|
|
LPDWORD lpdwAvail |
|
); |
The InetIsReadable function is used to determine if data is
available to be read from the socket.
Parameters
- hSocket
- Socket handle.
- dwTimeout
- Timeout value in milliseconds. If the socket cannot be read
within this time period, the function will return a value of zero.
A timeout value of zero specifies that the socket should be polled
without blocking the current thread.
- lpdwAvail
- A pointer to an unsigned integer which will contain the
number of bytes available to read.
Return Value
If the current thread can read data from the socket without
blocking, the function returns a non-zero value. If the current
thread cannot read any data without blocking, the function returns
zero.
Remarks
On some platforms, the value returned in lpdwAvail will not
exceed the size of the receive buffer (typically 64K bytes). Because
of differences between TCP/IP stack implementations, it is not
recommended that your application exclusively depend on this value to
determine the exact number of bytes available. Instead, it should be
used as a general indicator that there is data available to be
read.
If the connection is secure, the value returned
in lpdwAvail will reflect the number of bytes available in the
encrypted data stream. The actual amount of data available to the
application after it has been decrypted will vary.
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
InetIsClosed,
InetIsWritable,
InetPeek,
InetRead,
InetReadLine,
InetReadStream
|