node-ldapjs icon indicating copy to clipboard operation
node-ldapjs copied to clipboard

client listener events documentations

Open iamtennislover opened this issue 9 years ago • 4 comments

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)})

iamtennislover avatar Jan 20 '16 20:01 iamtennislover

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 :)

dcolens avatar Jan 28 '16 10:01 dcolens

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)

teemuniiranen avatar Dec 28 '17 13:12 teemuniiranen

Wow this would have been really nice to have in the documentation.

edperry avatar Jul 13 '18 15:07 edperry

It might also be worth it to consolidate some of these events to make them more intuitive

UziTech avatar Oct 13 '19 06:10 UziTech

👋

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.

jsumners avatar Feb 22 '23 19:02 jsumners