The concept of using select after a non blocking connect is unclear to me. If the socket is nonblocking the connect would return with EINPROGRESS what is the reason behind using select after connect in this case. If select return when the socket is ready, don't we need another call to connect to make that work ? what-are-possible-reason-for-socket-error-einprogress-in-solaris
Asked
Active
Viewed 127 times
1 Answers
1
Back in the early 1990s you were indeed supposed to issue a second connect()
after the socket showed up as writable in select()
. At some point this morphed without trace into checking SO_ERROR
instead.

user207421
- 305,947
- 44
- 307
- 483