File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 511511\funnm {connect}() will not block while waiting to connect. It will return
512512\texttt {-1 } with \texttt {errno } set to \texttt {EINPROGRESS } (= `` not possible to
513513create a connection right away'' ) and the connection request is stored in the
514- system queue to be processed. Until the connection is ready, subsequent
515- \funnm {connect}()s return \texttt {-1 } with \texttt {errno } set to
516- \texttt {EALREADY }. However, using this way to test the connection readiness is
517- not the right approach as if the background connection attempt fails, the next
514+ system queue to be processed. Until the connection is known (i.e. successfully
515+ connected or failed), subsequent \funnm {connect}()s return \texttt {-1 } with
516+ \texttt {errno } set to \texttt {EALREADY }.
517+ However, using this way to test the connection readiness is not the right
518+ approach as if the background connection attempt fails, the next
518519\funnm {connect}() tries to create a new connection and we would end up in a
519520never ending loop. The right approach is to use \funnm {select}() or
520521\funnm {poll}(), see pages \pageref {SELECT } and \pageref {POLL }. You can also
You can’t perform that action at this time.
0 commit comments