| BOOL WINAPI InetIsWritable( |
| |
SOCKET hSocket, |
|
| |
DWORD dwTimeout |
|
| ); |
The InetIsWritable function is used to determine if data
can be written to the socket.
Parameters
- hSocket
- Socket handle.
- dwTimeout
- Timeout value in milliseconds. If the socket cannot be written
to 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.
Return Value
If the current thread can write data to the socket within the
timeout period, the function returns a non-zero value. The function
will return zero if the socket send buffer is full.
Remarks
The InetIsWritable function cannot be used to determine the
amount of data that can be sent to the remote host without blocking the
current thread. A non-zero return value only indicates that the send
buffer is not full and can accept some data. In
most cases, it is recommended that larger blocks of data be broken
into smaller logical blocks rather than attempting to send it all of
the data at once. For very large streams of data, it is recommended
that you use the InetWriteStream function.
Requirements
Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cswsock12.h
Import Library: cswskv12.lib
See Also
|