diff options
author | Fedor Indutny <fedor.indutny@gmail.com> | 2013-06-17 12:11:13 +0200 |
---|---|---|
committer | Fedor Indutny <fedor.indutny@gmail.com> | 2013-06-17 14:00:26 +0200 |
commit | 212e9cd8c9b10da3c471638ca9b0f8ebef2a67bb (patch) | |
tree | d4ebca0c270b8b332a0b7da427453edf59198932 /doc/api/tls.markdown | |
parent | 0a4260c8c0deff518d0586c6b0484d459f9a79f4 (diff) | |
download | node-new-212e9cd8c9b10da3c471638ca9b0f8ebef2a67bb.tar.gz |
tls: session API returns
Diffstat (limited to 'doc/api/tls.markdown')
-rw-r--r-- | doc/api/tls.markdown | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/doc/api/tls.markdown b/doc/api/tls.markdown index 7c37a6f5df..fc0d8af501 100644 --- a/doc/api/tls.markdown +++ b/doc/api/tls.markdown @@ -403,6 +403,31 @@ established - it will be forwarded here. `tlsSocket` is the [tls.TLSSocket][] that the error originated from. +### Event: 'newSession' + +`function (sessionId, sessionData) { }` + +Emitted on creation of TLS session. May be used to store sessions in external +storage. + +NOTE: adding this event listener will have an effect only on connections +established after addition of event listener. + + +### Event: 'resumeSession' + +`function (sessionId, callback) { }` + +Emitted when client wants to resume previous TLS session. Event listener may +perform lookup in external storage using given `sessionId`, and invoke +`callback(null, sessionData)` once finished. If session can't be resumed +(i.e. doesn't exist in storage) one may call `callback(null, null)`. Calling +`callback(err)` will terminate incoming connection and destroy socket. + +NOTE: adding this event listener will have an effect only on connections +established after addition of event listener. + + ### server.listen(port, [host], [callback]) Begin accepting connections on the specified `port` and `host`. If the |