Skip to content

doc: document this binding in TLS callbacks - #66682

Open
bobnil wants to merge 1 commit into
nodejs:mainfrom
bobnil:doc/tls-callback-this-binding
Open

bobnil wants to merge 1 commit into
nodejs:mainfrom
bobnil:doc/tls-callback-this-binding

Conversation

@bobnil

@bobnil bobnil commented Oct 12, 2026

Copy link
Copy Markdown

Document that this is bound to the tls.TLSSocket instance when SNICallback and ALPNCallback are invoked.

The default SNICallback implementation already relies on this binding
to access this.server._contexts.

Both callbacks are invoked as methods on the socket:

Document that `this` is bound to the `tls.TLSSocket` instance
when `SNICallback` and `ALPNCallback` are invoked.

Signed-off-by: Robert I Nilsson <robert.i.nilsson@callclue.com>
@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to Node.js documentation. tls Issues and PRs related to the tls subsystem. labels Oct 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Welcome to Node.js, and thank you for your first contribution!

Before review, please take a moment to read:

Please make sure every commit is signed off. For a first pull request, GitHub Actions require collaborator approval and Jenkins CI must be started by a collaborator or triager, so an initial wait is normal.

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 Node.js documentation. tls Issues and PRs related to the tls subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants