Forcefully closes the socket connection immediately. This is an abrupt termination, unlike the graceful shutdown initiated by end(). It uses SO_LINGER with l_onoff=1 and l_linger=0 before calling close(2). Consider using close() or end() for graceful shutdowns.
TLSSocket.terminate method | Bun module | Bun BuildDocsReferenceGuidesBlogDiscord/Bun/TLSSocket/terminateMterminate BuildDocsReferenceGuidesBlogDiscord /Bun/TLSSocket/terminateMterminate TLSSocket.terminateterminate(): void;
Search the reference...
/
method
socket.terminate();
Resources
ReferenceDocsGuidesDiscordMerch StoreGitHubBlogToolkit
RuntimePackage managerTest runnerBundlerPackage runnerProject
Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco
We're hiring →TLSSocket.terminate method | Bun module | Bun,AI智能索引,全网链接索引,智能导航,网页索引
- API documentation for method bun.TLSSocket.terminate | Bun