@@ -193,7 +193,7 @@ Listening on a file descriptor is not supported on Windows.
193193
194194This function is asynchronous. When the server has been bound,
195195[ 'listening'] [ ] event will be emitted.
196- the last parameter ` callback ` will be added as an listener for the
196+ The last parameter ` callback ` will be added as an listener for the
197197[ 'listening'] [ ] event.
198198
199199### server.listen(options[ , callback] )
@@ -228,10 +228,10 @@ shown below.
228228
229229Stops the server from accepting new connections and keeps existing
230230connections. This function is asynchronous, the server is finally
231- closed when all connections are ended and the server emits a ` 'close' `
232- event. Optionally, you can pass a callback to listen for the ` 'close' `
233- event. If present, the callback is invoked with any potential error
234- as the first and only argument .
231+ closed when all connections are ended and the server emits a [ 'close'] [ ] event.
232+ The optional ` callback ` will be called once the ` 'close' ` event occurs. Unlike
233+ that event, it will be called with an Error as its only argument if the server
234+ was not open when it was closed .
235235
236236### server.address()
237237
@@ -317,7 +317,7 @@ event is not emitted until all connections are ended.
317317
318318* {Error Object}
319319
320- Emitted when an error occurs. The ` 'close' ` event will be called directly
320+ Emitted when an error occurs. The [ 'close'] [ ] event will be called directly
321321following this event. See example in discussion of ` server.listen ` .
322322
323323## Class: net.Socket
@@ -597,7 +597,7 @@ following this event.
597597
598598### Event: 'close'
599599
600- * ` had_error ` {Boolean} true if the socket had a transmission error
600+ * ` had_error ` {Boolean} ` true ` if the socket had a transmission error.
601601
602602Emitted once the socket is fully closed. The argument ` had_error ` is a boolean
603603which says if the socket was closed due to a transmission error.
@@ -617,6 +617,7 @@ Returns true if input is a version 4 IP address, otherwise returns false.
617617
618618Returns true if input is a version 6 IP address, otherwise returns false.
619619
620+ [ 'close' ] : #net_event_close
620621[ 'connect' ] : #net_event_connect
621622[ 'connection' ] : #net_event_connection
622623[ 'end' ] : #net_event_end
0 commit comments