Stops the server from accepting new connections and keeps existing connections. This function is asynchronous, the server is finally closed when all connections are ended and the server emits a 'close' event. The optional callback will be called once the 'close' event occurs. Unlike that event, it will be called with an Error as its only argument if the server was not open when it was closed.
Server.close method | Node.js net module | Bun BuildDocsReferenceGuidesBlogDiscord/node:net/Server/closeMclose BuildDocsReferenceGuidesBlogDiscord /node:net/Server/closeMclose net.Server.closeclose(callback?: (err?: Error) => void): this; @param callback
Search the reference...
/
method
Called when the server is closed.
Resources
ReferenceDocsGuidesDiscordMerch StoreGitHubBlogToolkit
RuntimePackage managerTest runnerBundlerPackage runnerProject
Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco
We're hiring →Server.close method | Node.js net module | Bun,AI智能索引,全网链接索引,智能导航,网页索引
- API documentation for method node:net.Server.close | Bun