docs: document ALPNCallback option for TLSSocket#61052
Closed
som14062005 wants to merge 2 commits intonodejs:mainfrom
Closed
docs: document ALPNCallback option for TLSSocket#61052som14062005 wants to merge 2 commits intonodejs:mainfrom
som14062005 wants to merge 2 commits intonodejs:mainfrom
Conversation
Contributor
|
@som14062005 |
Author
|
@ikeyan Good catch! I've removed the duplicate options.session entry. Thanks for the review! |
lpinca
reviewed
Dec 29, 2025
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`. |
Member
There was a problem hiding this comment.
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()`][] |
Author
There was a problem hiding this comment.
@lpinca Good suggestion,I've simplified the documentation to use a cross-reference to tls.createServer() for consistency. Thanks for the feedback
lpinca
approved these changes
Dec 29, 2025
lpinca
approved these changes
Dec 29, 2025
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #61047
Added documentation for the
ALPNCallbackoption innew tls.TLSSocket()which was previously undocumented but functional.
This option allows server-side TLS sockets to dynamically select ALPN
protocols when
isServeris true.