socket.close([callback])


  • callback <Function> 当套接字已关闭时调用。

关闭底层套接字并停止监听其上的数据。如果提供了回调函数,它将被添加为 'close' 事件的监听器。

【Close the underlying socket and stop listening for data on it. If a callback is provided, it is added as a listener for the 'close' event.】