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.
How to initialize and connect to LDAP Server without using ldap_open()
-
30-07-2022 - |
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.
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow