Browse Source

doc: fix indent in tls resumption example

Markdown requires 4-space indent to correctly format code blocks. This
fixes the example so it's correctly presented as code.

PR-URL: https://github.com/nodejs/node/pull/3372
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
v4.x
Roman Reiss 10 years ago
committed by James M Snell
parent
commit
bc29aad22b
  1. 16
      doc/api/tls.markdown

16
doc/api/tls.markdown

@ -606,14 +606,14 @@ established after addition of event listener.
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'

Loading…
Cancel
Save