| BOOL
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 long 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 this function is called for a secure socket, 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
Client: Requires Windows Vista, Windows XP or Windows
2000 Professional.
Server: Requires Windows Server 2008, Windows Server 2003 or
Windows 2000 Server.
Header: Include cswsock6.h.
Library: Use cswskav6.lib.
See Also
InetIsConnected, InetIsListening, InetIsWritable, InetPeek
|