Node-ldapjs: client listener events documentations

Created on 20 Jan 2016  路  4Comments  路  Source: ldapjs/node-ldapjs

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)})
good first issue help-wanted documentation

Most helpful comment

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

All 4 comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jjayaraman picture jjayaraman  路  5Comments

moehlone picture moehlone  路  3Comments

djholly123 picture djholly123  路  3Comments

jvanalst picture jvanalst  路  6Comments

sorccu picture sorccu  路  5Comments