qazmlp writes: > For the LDAP asynchronous response, the client program should keep > polling for the response. From my point of view, this is less > performant. Is there any automatic callback mechanism, so that the > client program does not need to do the polling on its own and it can > continue doing other processing till the response arrives.
A callback in the LDAP library will only be called when the program is executing some LDAP function, not when it is doing something else. What callbacks might exist depends on which LDAP implementation you use. If you are using the semi-standard LDAP C API, you can call ldap_result(,LDAP_RES_ANY,,,) which will return the first LDAP message which arrives, and also has a timeout parameter. If you want the program to handle LDAP messages while doing non-LDAP things, you can use threads or spawn a separate process which handles the LDAP part of the program. Threads may be more efficient and makes communication between the LDAP part and the rest of the program simpler, but it also has various traps you can fall into. If you use a separate process, you can use shared memory or pipes to communicate between the processes. -- Regards, Hallvard --- You are currently subscribed to [email protected] as: [EMAIL PROTECTED] To unsubscribe send email to [EMAIL PROTECTED] with the word UNSUBSCRIBE as the SUBJECT of the message.
