| Previous | Next |
| EALREADY |
EINPROGRESS
Expected asynchronous progress for nonblocking connect
EINPROGRESS is often a normal intermediate result, not a terminal connection failure. Solaris uses a nonblocking connect() as the example: the operation takes time, so the call returns while connection establishment continues.
The state differs from EALREADY. EINPROGRESS reports that the asynchronous operation has been initiated; EALREADY can report a new attempt made while that operation is still pending. Event-driven clients need a distinct connecting state to represent this interval.
Handle the pending operation
- Register the socket for the readiness/completion mechanism used by the program and retain a connection deadline separately.
- On completion notification, obtain the final connection status before marking the socket connected.
- Prevent send/receive paths from using the endpoint as established merely because the initial
connect()returned control.
References
- Oracle Solaris intro(2) errno catalog
- POSIX connect() error conditions
- POSIX socket() domain, type, and protocol rules
Looking for a different code? Search another status or error code.