johnmiller@email.it writes:
why should I use asynchronous functions?
Your application might have some other work to do. Like responding to
user input, if it's an interactive application. Then you can send the
LDAP request, do some work, check for the LDAP response, if it has not
arrived do some more work, and so on.
Also you don't need to wait for the response to one LDAP request before
sending the next, except with Bind and Start TLS.
From the LDAP client point of view, do they use less memory or more?
The ldap_<foo>_s() functions are just wrappers around ldap_<foo>()
followed by ldap_result() and maybe ldap_result2error(). So you might
get them to use less memory on errors if you cripple your error
handling, but otherwise it should make little difference.