CSocketWrench::GetStatus Method  
 
INT GetStatus();

The GetStatus method returns the current status of the socket.

Parameters

None.

Return Value

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

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 method 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

IsConnected, IsInitialized, IsListening, IsReadable, IsWritable