Question

How to initialize and connect to OpenLDAP Server without using ldap_open() function. I would like to test the feature LDAP test connection for this I need to open a connection with timeout and close it to check if the connection is available or not.

Was it helpful?

Solution

Just create a socket and call connect(), using non-blocking mode and your choice of select()/poll()/epoll() to control the timeout. Close it immediately on success, don't send anything.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top