Here's an example for using TLS session resumption:
- var tlsSessionStore = {};
- server.on('newSession', function(id, data, cb) {
- tlsSessionStore[id.toString('hex')] = data;
- cb();
- });
- server.on('resumeSession', function(id, cb) {
- cb(null, tlsSessionStore[id.toString('hex')] || null);
- });
+ var tlsSessionStore = {};
+ server.on('newSession', function(id, data, cb) {
+ tlsSessionStore[id.toString('hex')] = data;
+ cb();
+ });
+ server.on('resumeSession', function(id, cb) {
+ cb(null, tlsSessionStore[id.toString('hex')] || null);
+ });
### Event: 'OCSPRequest'