diff options
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 |