node-ldapjs
node-ldapjs copied to clipboard
client listener events documentations
Hi, I would like to know what are the events that I can listen on for client? Is there any documentation for this?
var client = ldap.createClient({
url: testurl
});
client.on('error', function(err) {console.log(err)})
I too would be interested to get some documentation about client events, there seems to be quite a lot:
- error
- destroy
- idle
- connectError
- setup
- resultError
- setupError
- socketTimeout
- end
- connect
- close
- timeout
while many are easy to guess, it would be great to get some documentation on the expected flows for these events :)
Definitely some documentation is needed. I am currently struggling with a close for example. I have no idea how to test and raise this event but without handling the event it is crashing my app.
at Client._onClose (/data/app/node_modules/ldapjs/lib/client/client.js:1272:19)
at Object.onceWrapper (events.js:293:19)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at TCP._handle.close [as _onclose] (net.js:511:12)
Wow this would have been really nice to have in the documentation.
It might also be worth it to consolidate some of these events to make them more intuitive
👋
On February 22, 2023, we released version 3 of this library. As a result, we are closing this issue/pull request.
Please see issue #839 for more information, including how to proceed if you feel this closure is in error.