diff options
author | Sam Roberts <vieuxtech@gmail.com> | 2015-03-02 12:22:43 -0800 |
---|---|---|
committer | Sam Roberts <vieuxtech@gmail.com> | 2015-07-28 11:06:02 -0700 |
commit | 54627a919dbaa84de0ab53a4917deb2d4d848fc9 (patch) | |
tree | 2a9053bcec34114647bc4a14bb93dd7a4b4bee62 /doc | |
parent | a4b46001e854f7356b89ac710b2d9e2a768459fd (diff) | |
download | android-node-v8-54627a919dbaa84de0ab53a4917deb2d4d848fc9.tar.gz android-node-v8-54627a919dbaa84de0ab53a4917deb2d4d848fc9.tar.bz2 android-node-v8-54627a919dbaa84de0ab53a4917deb2d4d848fc9.zip |
doc: server close event does not have an argument
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
PR-URL: https://github.com/nodejs/io.js/pull/1025
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/net.markdown | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/doc/api/net.markdown b/doc/api/net.markdown index c4631bef18..21e7e5a0a3 100644 --- a/doc/api/net.markdown +++ b/doc/api/net.markdown @@ -193,7 +193,7 @@ Listening on a file descriptor is not supported on Windows. This function is asynchronous. When the server has been bound, ['listening'][] event will be emitted. -the last parameter `callback` will be added as an listener for the +The last parameter `callback` will be added as an listener for the ['listening'][] event. ### server.listen(options[, callback]) @@ -228,10 +228,10 @@ shown below. 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. Optionally, you can pass a callback to listen for the `'close'` -event. If present, the callback is invoked with any potential error -as the first and only argument. +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.address() @@ -317,7 +317,7 @@ event is not emitted until all connections are ended. * {Error Object} -Emitted when an error occurs. The `'close'` event will be called directly +Emitted when an error occurs. The ['close'][] event will be called directly following this event. See example in discussion of `server.listen`. ## Class: net.Socket @@ -597,7 +597,7 @@ following this event. ### Event: 'close' -* `had_error` {Boolean} true if the socket had a transmission error +* `had_error` {Boolean} `true` if the socket had a transmission error. Emitted once the socket is fully closed. The argument `had_error` is a boolean which 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. Returns true if input is a version 6 IP address, otherwise returns false. +['close']: #net_event_close ['connect']: #net_event_connect ['connection']: #net_event_connection ['end']: #net_event_end |