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

Re: OpenLDAP API: why to use asynchronous functions?

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.

> I have this concern because my code will have to work on an embedded
> system with not much RAM.

Then I'd also look for a smaller LDAP library than that from OpenLDAP,
one which supports fewer LDAP features.  If you don't need many, anyway.
Try ldap@umich.edu, or the #ldap channel at IRC net Freenode.