mirror of https://github.com/nodejs/node.git
doc: Add condition to emit close event of net.Server
parent
6628a3b6ea
commit
534264d209
|
@ -160,10 +160,11 @@ the last parameter `listeningListener` will be added as an listener for the
|
||||||
|
|
||||||
### server.close([cb])
|
### server.close([cb])
|
||||||
|
|
||||||
Stops the server from accepting new connections. This function is
|
Stops the server from accepting new connections and keeps existing
|
||||||
asynchronous, the server is finally closed when the server emits a `'close'`
|
connections. This function is asynchronous, the server is finally
|
||||||
event. Optionally, you can pass a callback to listen for the `'close'` event.
|
closed when all connections are ended and the server emits a `'close'`
|
||||||
|
event. Optionally, you can pass a callback to listen for the `'close'`
|
||||||
|
event.
|
||||||
|
|
||||||
### server.address()
|
### server.address()
|
||||||
|
|
||||||
|
@ -210,7 +211,8 @@ Emitted when a new connection is made. `socket` is an instance of
|
||||||
|
|
||||||
### Event: 'close'
|
### Event: 'close'
|
||||||
|
|
||||||
Emitted when the server closes.
|
Emitted when the server closes. Note that if connections exist, this
|
||||||
|
event is not emitted until all connections are ended.
|
||||||
|
|
||||||
### Event: 'error'
|
### Event: 'error'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue