How the connect() call is non-blocking
Jim Reid
jim at rfc1035.com
Wed Feb 23 09:53:02 UTC 2000
>>>>> "Srini" == SRINIVASU V V S <srinivvs at future.futsoft.com> writes:
Srini> hi all, i have seen the code in which the connect() call in
Srini> named is made nonblocking... It is called something like
Srini> evConnect() How will the named (in a recursive service
Srini> using TCP) know that the connection is established when the
Srini> connect() is called in non-blocking mode..
select() does this. The file descriptor becomes writable once the
connection is established. See pp 409-411 of Unix Network Programming,
Vol1, Second Edition. Pretty much all the I/O that named does is
non-blocking. We can't have the name server unable to answer queries
because it's stuck waiting for a TCP ACK to be sent from the far end
or whatever.
More information about the bind-users
mailing list