Skip to content

Commit

Permalink
doc: fix indent in tls resumption example
Browse files Browse the repository at this point in the history
Markdown requires 4-space indent to correctly format code blocks. This
fixes the example so it's correctly presented as code.

PR-URL: #3372
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
  • Loading branch information
silverwind committed Oct 15, 2015
1 parent dae9fae commit 503f279
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions doc/api/tls.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -605,14 +605,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'

Expand Down

0 comments on commit 503f279

Please sign in to comment.