InetIsWritable
BOOL 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 without blocking, the function returns a non-zero value. If the current thread cannot write any data without blocking, the function returns zero.

Remarks

Although this function can be used to determine if some amount of data can be written to the socket, it does not indicate the amount of data that can be written without blocking the calling process. In most cases, it is recommended that large amounts of data be broken into smaller logical blocks, typically some multiple of 512 bytes in length.

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, InetIsReadable


Copyright © 2008 Catalyst Development Corporation. All rights reserved.