Interestingly you don't really need to poll till you get the result
back from server.
Async operations actually allow client to continue doing the work and
ask for
result when it actually needs them to proceed. Though this can still be
called
as polling, it is not required to do in a loop. Some thing like below
can be done:
-> call ldap_search_ext()
-> do some other processing (client is free to do any thing here).
-> Ok, we have some time to process results here. So call
ldap_result().
-> If we get 0 as return (i.e. timeout, results are not yet sent by
server), we can do
other processing (if any) or loop till we get results or simply send
NULL timeout
in ldap_result() so that application is blocked till result
arrives.
Thanks,
Yogesh