server.close([callback])
新增于: v0.3.2
-
callback<Function> 监听器回调,将被注册以监听服务器实例的'close'事件。\
callback<Function> A listener callback that will be registered to listen for the server instance's'close'event. -
返回:<tls.Server>
\Returns: <tls.Server>
server.close() 方法阻止服务器接受新连接。
\The server.close() method stops the server from accepting new connections.
此函数异步地运行。当服务器没有更多打开的连接时,则将触发 'close' 事件。
\This function operates asynchronously. The 'close' event will be emitted
when the server has no more open connections.