Skip to content

Commit 9ba52a5

Browse files
committed
docs: document ALPNCallback option for TLSSocket
1 parent 4f24aff commit 9ba52a5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

doc/api/tls.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -899,6 +899,11 @@ changes:
899899
* `rejectUnauthorized`: See [`tls.createServer()`][]
900900
* `ALPNProtocols`: See [`tls.createServer()`][]
901901
* `SNICallback`: See [`tls.createServer()`][]
902+
* `ALPNCallback` {Function} A callback function that will be called when a
903+
client supports ALPN to select a protocol from the list offered by the
904+
client. The callback receives an object with `servername` and `protocols`
905+
properties. Should return a string from the `protocols` list or `undefined`
906+
if none match. Only used when `isServer` is `true`.
902907
* `session` {Buffer} A `Buffer` instance containing a TLS session.
903908
* `requestOCSP` {boolean} If `true`, specifies that the OCSP status request
904909
extension will be added to the client hello and an `'OCSPResponse'` event

0 commit comments

Comments
 (0)