[Date Prev][Date Next] [Chronological] [Thread] [Top]

ldap_search_ext() blocks while establishing TCP connection?


I'm looking into ldap client library code to see if
any of the calls can block.  I'm just wondering if the
first call to ldap_search_ext() [after ldap_init()]
can block for a short while to establish the TCP
connection.  In os-ip.c:ldap_pvt_connect() there is a
call to ldap_pvt_ndelay_on() before the connect() and
ldap_pvt_ndelay_off() after the connect().  This calls
fcntl() with O_NONBLOCK flag set/clear.  Based on this
it seems at least the connect is non-blocking (so it
should immediately return without waiting SYN/ACK from
ldap server).  But I also see an async parameter in
that function (it is not used currently; it's under
#ifdef notyet).  I'm wondering what's the use of this.

In short, two questions:
- can first call to ldap_search_ext() block for a
short while during the TCP connection establishment?
- what is the purpose of async parameter in

Thanks for your time,

Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!