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

Re: ldap_search_ext() blocks while establishing TCP connection?

Manish Godara writes:
> 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.

It can.  "Asynchronous" LDAP API functions can also block if the
socket buffer gets full: If the request is very large or if you
have sent a lot of calls that haven't been 'drained' yet.

That an function is "asynchronous" only means that it will not
wait for the server's response, so you must fetch that with a
separate function call.

OTOH, ldap_result() takes a timeout parameter which says for how
long the function may block.

> - what is the purpose of async parameter in
> os-ip.c:ldap_pvt_connect().

It is not (yet) used.