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 |
Constant |
Description |
| 0 |
INET_STATUS_UNUSED |
No connection has been established. |
| 1 |
INET_STATUS_IDLE |
The socket is idle and not in a blocked state |
| 2 |
INET_STATUS_LISTEN |
The socket is listening for inbound connections from a
client |
| 3 |
INET_STATUS_CONNECT |
The socket is establishing a connection with a server |
| 4 |
INET_STATUS_ACCEPT |
The socket is accepting a connection from a client |
| 5 |
INET_STATUS_READ |
Data is being read from the socket |
| 6 |
INET_STATUS_WRITE |
Data is being written to the socket |
| 7 |
INET_STATUS_FLUSH |
The socket is being flushed; all data in the receive buffers
is being discarded |
| 8 |
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: Include cswsock10.h
Import Library: cswskv10.lib
See Also
IsConnected,
IsInitialized,
IsListening,
IsReadable,
IsWritable
|