FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

docs: document ALPNCallback option for TLSSocket by som14062005 · Pull Request #61052 · nodejs/node · GitHub

/ node Public

docs: document ALPNCallback option for TLSSocket - #61052

Closed
som14062005 wants to merge 2 commits into
nodejs:mainfrom
som14062005:main
Closed

docs: document ALPNCallback option for TLSSocket#61052
som14062005 wants to merge 2 commits into
nodejs:mainfrom
som14062005:main

Conversation

Copy link
Copy Markdown

Fixes #61047

Added documentation for the ALPNCallback option in new tls.TLSSocket()
which was previously undocumented but functional.

This option allows server-side TLS sockets to dynamically select ALPN
protocols when isServer is true.

nodejs-github-bot added doc Issues and PRs related to the documentations. tls Issues and PRs related to the tls subsystem. labels Dec 13, 2025

ikeyan commented Dec 15, 2025

Copy link
Copy Markdown
Contributor

@som14062005 options.session is duplicated by mistake.

som14062005 commented Dec 15, 2025
edited
Loading

Copy link
Copy Markdown
Author

@ikeyan Good catch! I've removed the duplicate options.session entry. Thanks for the review!

Comment thread doc/api/tls.md Outdated
Comment on lines +902 to +906
* `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`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality
Suggested change
* `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()`][]

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@lpinca Good suggestion,I've simplified the documentation to use a cross-reference to tls.createServer() for consistency. Thanks for the feedback

som14062005 closed this by deleting the head repository Jan 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Issues and PRs related to the documentations. tls Issues and PRs related to the tls subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

doc: new tls.TLSSocket() supportsALPNCallback option but it is undocumented

4 participants


Back | FazBrowse Home | New Git URL