From 9ba52a59a21eb5e8effb1ea8c5d2e95ef2a45977 Mon Sep 17 00:00:00 2001 From: som14062005 Date: Sun, 14 Dec 2025 00:12:34 +0530 Subject: [PATCH 1/2] docs: document ALPNCallback option for TLSSocket --- doc/api/tls.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/api/tls.md b/doc/api/tls.md index 43fa0c990e19b8..abb0dfce01315e 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -899,6 +899,11 @@ changes: * `rejectUnauthorized`: See [`tls.createServer()`][] * `ALPNProtocols`: See [`tls.createServer()`][] * `SNICallback`: See [`tls.createServer()`][] + * `ALPNCallback` {Function} A callback function that will be called when a + client supports ALPN to select a protocol from the list offered by the + client. The callback receives an object with `servername` and `protocols` + properties. Should return a string from the `protocols` list or `undefined` + if none match. Only used when `isServer` is `true`. * `session` {Buffer} A `Buffer` instance containing a TLS session. * `requestOCSP` {boolean} If `true`, specifies that the OCSP status request extension will be added to the client hello and an `'OCSPResponse'` event From 336d68d028d7d0654c15cf695376ac40f9d24884 Mon Sep 17 00:00:00 2001 From: som14062005 Date: Tue, 30 Dec 2025 01:27:35 +0530 Subject: [PATCH 2/2] doc: document ALPNCallback option for TLSSocket Fixes: https://github.com/nodejs/node/issues/61047 --- doc/api/tls.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/doc/api/tls.md b/doc/api/tls.md index abb0dfce01315e..23b936fbb73b97 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -899,11 +899,7 @@ changes: * `rejectUnauthorized`: See [`tls.createServer()`][] * `ALPNProtocols`: See [`tls.createServer()`][] * `SNICallback`: See [`tls.createServer()`][] - * `ALPNCallback` {Function} A callback function that will be called when a - client supports ALPN to select a protocol from the list offered by the - client. The callback receives an object with `servername` and `protocols` - properties. Should return a string from the `protocols` list or `undefined` - if none match. Only used when `isServer` is `true`. + * `ALPNCallback`: See [`tls.createServer()`][] * `session` {Buffer} A `Buffer` instance containing a TLS session. * `requestOCSP` {boolean} If `true`, specifies that the OCSP status request extension will be added to the client hello and an `'OCSPResponse'` event