Skip to content

Conversation

@kimtaejin3
Copy link
Contributor

@kimtaejin3 kimtaejin3 commented Jan 12, 2026

The code was refactored in commit 062ae6f to use 'protocol' instead of 'alpn'
for the ALPN protocol identifier option. However, the documentation was not updated
to reflect this change.

This commit updates the documentation to match the actual implementation:

  • Removes the non-functional 'alpn' option from SessionOptions
  • Adds the 'protocol' option with proper description
  • Updates example code to use 'protocol' instead of 'alpn'
  • Updates OnHandshakeCallback parameter from 'alpn' to 'protocol'

Why this change is necessary:

The destructuring assignment in processTlsOptions() expects a protocol property:
pt
const { protocol } = tls;

Therefore, using alpn will not work:

// This won't work
const alpn = 'h3';
connect(address, { alpn }); // protocol will be undefined

// This is correct
const protocol = 'h3';
connect(address, { protocol });

Refs: 062ae6f3cb5

The code was refactored in commit 062ae6f to use 'protocol'
instead of 'alpn' for the ALPN protocol identifier option.
However, the documentation was not updated to reflect this change.

This commit updates the documentation to match the actual
implementation:
- Removes the non-functional 'alpn' option from SessionOptions
- Adds the 'protocol' option with proper description
- Updates example code to use 'protocol' instead of 'alpn'
- Updates OnHandshakeCallback parameter from 'alpn' to 'protocol'

Refs: nodejs@062ae6f3cb5
@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. quic Issues and PRs related to the QUIC implementation / HTTP/3. labels Jan 12, 2026
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. quic Issues and PRs related to the QUIC implementation / HTTP/3.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants