If set, this will be called when a client opens a connection using the ALPN extension. One argument will be passed to the callback: an object containing servername and protocols fields, respectively containing the server name from the SNI extension (if any) and an array of ALPN protocol name strings. The callback must return either one of the strings listed in protocols, which will be returned to the client as the selected ALPN protocol, or undefined, to reject the connection with a fatal alert. If a string is returned that does not match one of the client's ALPN protocols, an error will be thrown. This option cannot be used with the ALPNProtocols option, and setting both options will throw an error.
property ALPNCallback | Node.js https module | Bun BuildDocsReferenceGuidesBlogDiscord/node:https/ServerOptions/ALPNCallbackPALPNCallback BuildDocsReferenceGuidesBlogDiscord /node:https/ServerOptions/ALPNCallbackPALPNCallback https.ServerOptions.ALPNCallbackALPNCallback?: (arg: { protocols: string[]; servername: string }) => undefined | string
Search the reference...
/
property
Resources
ReferenceDocsGuidesDiscordMerch StoreGitHubBlogToolkit
RuntimePackage managerTest runnerBundlerPackage runnerProject
Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco
We're hiring →property ALPNCallback | Node.js https module | Bun,AI智能索引,全网链接索引,智能导航,网页索引
- If set, this will be called when a client opens a connection using the ALPN extension.
One argument will be passed to the callback: an object containing `servername` and `protocols` fields,
respectively containing the server name from the SNI extension (if any) and an array of
ALPN protocol name strings. The callback must return either one of the strings listed in `protocols`,
which will be returned to the client as the selected ALPN protocol, or `undefined`,
to reject the connection with a fatal alert. If a string is returned that does not match one of
the client