| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b3c5ad1 commit 28aac7f
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -603,6 +603,16 @@ perform lookup in external storage using given `sessionId`, and invoke | |||
| 603 | 603 | NOTE: adding this event listener will have an effect only on connections | |
| 604 | 604 | established after addition of event listener. | |
| 605 | 605 | ||
| 606 | + Here's an example for using TLS session resumption: | ||
| 607 | + | ||
| 608 | + var tlsSessionStore = {}; | ||
| 609 | + server.on('newSession', function(id, data, cb) { | ||
| 610 | + tlsSessionStore[id.toString('hex')] = data; | ||
| 611 | + cb(); | ||
| 612 | + }); | ||
| 613 | + server.on('resumeSession', function(id, cb) { | ||
| 614 | + cb(null, tlsSessionStore[id.toString('hex')] || null); | ||
| 615 | + }); | ||
| 606 | 616 | ||
| 607 | 617 | ### Event: 'OCSPRequest' | |
| 608 | 618 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments