InetGetStatus Function  
 
INT WINAPI InetGetStatus(
  SOCKET hSocket  
);

The InetGetStatus function is used to report what sort of socket operation is in progress.

Parameters

hSocket
The socket handle.

Return Value

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

Remarks

The return value is one of the following values:

Value Description
INET_STATUS_UNUSED No connection has been established.
INET_STATUS_IDLE The socket is idle and not in a blocked state
INET_STATUS_LISTEN The socket is listening for inbound connections from a client
INET_STATUS_CONNECT The socket is establishing a connection with a server
INET_STATUS_ACCEPT The socket is accepting a connection from a client
INET_STATUS_READ Data is being read from the socket
INET_STATUS_WRITE Data is being written to the socket
INET_STATUS_FLUSH The socket is being flushed; all data in the receive buffers is being discarded
INET_STATUS_DISCONNECT The socket is disconnecting from the remote host

In a multithreaded application, any thread in the current process may call this function to obtain status information for the specified socket.

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

InetGetBlockingSocket, InetIsConnected, InetIsListening, InetIsReadable, InetIsWritable