温馨提示:本站仅提供公开网络链接索引服务,不存储、不篡改任何第三方内容,所有内容版权归原作者所有
AI智能索引来源:http://www.bun.com/reference/node/tls/BunConnectionOptions/ALPNCallback
点击访问原文链接

property ALPNCallback | Node.js tls module | Bun

property ALPNCallback | Node.js tls module | BunBuildDocsReferenceGuidesBlogDiscord/node:tls/BunConnectionOptions/ALPNCallbackPALPNCallback

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/node:tls/BunConnectionOptions/ALPNCallbackPALPNCallback

property

tls.BunConnectionOptions.ALPNCallbackALPNCallback?: (arg: { protocols: string[]; servername: string }) => undefined | string

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.

Resources

ReferenceDocsGuidesDiscordMerch StoreGitHubBlog 

Toolkit

RuntimePackage managerTest runnerBundlerPackage runner

Project

Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicense

Baked with ❤️ in San Francisco

We're hiring →

property ALPNCallback | Node.js tls 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