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 <thechargingvolcano@gmail.com>
  • Loading branch information
silverwind authored and jasnell committed Oct 26, 2015
1 parent 41a4258 commit e223fc7
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 @@ -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'

Expand Down

0 comments on commit e223fc7

Please sign in to comment.