-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
docs: document ALPNCallback option for TLSSocket #61052
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@som14062005 |
|
@ikeyan Good catch! I've removed the duplicate options.session entry. Thanks for the review! |
doc/api/tls.md
Outdated
| * `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`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * `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()`][] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lpinca Good suggestion,I've simplified the documentation to use a cross-reference to tls.createServer() for consistency. Thanks for the feedback
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.