Here's a snippet from the example code in the docs for the TLS module:
var cleartextStream = tls.connect(8000, options, function() {
console.log('client connected',
cleartextStream.authorized ? 'authorized' : 'unauthorized');
process.stdin.pipe(cleartextStream);
process.stdin.resume();});
Note how the callback function passed to tls.connect uses cleartextStream.
That is returned from tls.connect.
This seems unusual. Is it safe to assume that the callback will be invoked
after the function returns?
I wonder why cleartextStream isn't just passed to the callback rather than
being returned from tls.connect.
--
R. Mark Volkmann
Object Computing, Inc.
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en