Warning: SimpleXMLElement::asXML(E:\phpstudy_pro\zhutiblog\sitemaps\sitemap_55.xml.tmp): failed to open stream: Permission denied in E:\phpstudy_pro\zhutiblog\dd.php on line 1322
Bun.TCPSocketConnectOptions TypeScript interface | API Reference | Bun - AI智能索引
温馨提示:本站仅提供公开网络链接索引服务,不存储、不篡改任何第三方内容,所有内容版权归原作者所有
AI智能索引来源:http://www.bun.com/reference/bun/TCPSocketConnectOptions
点击访问原文链接

Bun.TCPSocketConnectOptions TypeScript interface | API Reference | Bun

Bun.TCPSocketConnectOptions TypeScript interface | API Reference | BunBuildDocsReferenceGuidesBlogDiscord/Bun/TCPSocketConnectOptionsPallowHalfOpenPdataPexclusivePhostnamePipv6OnlyPportPreusePortPsocketPtls

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/Bun/TCPSocketConnectOptionsPallowHalfOpenPdataPexclusivePhostnamePipv6OnlyPportPreusePortPsocketPtls

interface

TCPSocketConnectOptionsinterface TCPSocketConnectOptionsData = undefined>allowHalfOpen?: boolean

Whether to allow half-open connections.

A half-open connection occurs when one end of the connection has called close() or sent a FIN packet, while the other end remains open. When set to true:

The socket won't automatically send FIN when the remote side closes its endThe local side can continue sending data even after the remote side has closedThe application must explicitly call end() to fully close the connection

When false, the socket automatically closes both ends of the connection when either side closes.

data?: Data

The per-instance data context

exclusive?: boolean

Whether to use exclusive mode.

When set to true, the socket binds exclusively to the specified address:port combination, preventing other processes from binding to the same port.

When false (default), other sockets may be able to bind to the same port depending on the operating system's socket sharing capabilities and settings.

Exclusive mode is useful in scenarios where you want to ensure only one instance of your server can bind to a specific port at a time.

hostname: string

The hostname to connect to

ipv6Only?: booleanport: number

The port to connect to

reusePort?: booleansocket: SocketHandlerData>

Handlers for socket events

tls?: boolean | TLSOptions

TLS Configuration with which to create the socket

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 →

Bun.TCPSocketConnectOptions TypeScript interface | API Reference | Bun,AI智能索引,全网链接索引,智能导航,网页索引

    API documentation for interface bun.TCPSocketConnectOptions | Bun