From 25f9da2e5d56571d87bda08bb9df7f139bb5fd86 Mon Sep 17 00:00:00 2001 From: Mark Cavage Date: Tue, 27 Sep 2011 13:18:07 -0700 Subject: [PATCH] client referral docs --- docs/client.md | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/docs/client.md b/docs/client.md index c51e982..4f5953f 100644 --- a/docs/client.md +++ b/docs/client.md @@ -206,13 +206,14 @@ fields: ||timeLimit||the maximum amount of time the server should take in responding, in seconds. Defaults to 10. Lots of servers will ignore this.|| Responses from the `search` method are an `EventEmitter` where you will get a -notification for each search entry that comes back from the server. You will -additionally be able to listen for an `error` and `end` event. Note that the -`error` event will only be for client/TCP errors, not LDAP error codes like the -other APIs. You'll want to check the LDAP status code (likely for `0`) on the -`end` event to assert success. LDAP search results can give you a lot of status -codes, such as time or size exceeded, busy, inappropriate matching, etc., -which is why this method doesn't try to wrap up the code matching. +notification for each `searchEntry` that comes back from the server. You will +additionally be able to listen for a `searchReference`, `error` and `end` event. +Note that the `error` event will only be for client/TCP errors, not LDAP error +codes like the other APIs. You'll want to check the LDAP status code +(likely for `0`) on the `end` event to assert success. LDAP search results +can give you a lot of status codes, such as time or size exceeded, busy, +inappropriate matching, etc., which is why this method doesn't try to wrap up +the code matching. Example: @@ -227,6 +228,9 @@ Example: res.on('searchEntry', function(entry) { console.log('entry: ' + JSON.stringify(entry.object)); }); + res.on('searchReference', function(referral) { + console.log('referral: ' + referral.uris.join()); + }); res.on('error', function(err) { console.error('error: ' + err.message); });