doc: fix connectListener description in net docs
`connectListener` is registered as a listener to the 'connect' event once. Update the documentation to reflect that behavior. Fixes: https://github.com/nodejs/io.js/issues/901 PR-URL: https://github.com/nodejs/io.js/pull/1717 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
parent
6edc900b95
commit
fbaef40e63
@ -67,8 +67,8 @@ The options are passed to both the ['net.Socket'](#net_class_net_socket)
|
|||||||
constructor and the ['socket.connect'](#net_socket_connect_options_connectlistener)
|
constructor and the ['socket.connect'](#net_socket_connect_options_connectlistener)
|
||||||
method.
|
method.
|
||||||
|
|
||||||
The `connectListener` parameter will be added as an listener for the
|
The `connectListener` parameter will be added as a listener for the
|
||||||
['connect'][] event.
|
['connect'][] event once.
|
||||||
|
|
||||||
Here is an example of a client of the previously described echo server:
|
Here is an example of a client of the previously described echo server:
|
||||||
|
|
||||||
@ -100,8 +100,8 @@ supplied `port` and `host`.
|
|||||||
|
|
||||||
If `host` is omitted, `'localhost'` will be assumed.
|
If `host` is omitted, `'localhost'` will be assumed.
|
||||||
|
|
||||||
The `connectListener` parameter will be added as an listener for the
|
The `connectListener` parameter will be added as a listener for the
|
||||||
['connect'][] event.
|
['connect'][] event once.
|
||||||
|
|
||||||
## net.connect(path[, connectListener])
|
## net.connect(path[, connectListener])
|
||||||
## net.createConnection(path[, connectListener])
|
## net.createConnection(path[, connectListener])
|
||||||
@ -110,8 +110,8 @@ A factory function, which returns a new unix
|
|||||||
['net.Socket'](#net_class_net_socket) and automatically connects to the
|
['net.Socket'](#net_class_net_socket) and automatically connects to the
|
||||||
supplied `path`.
|
supplied `path`.
|
||||||
|
|
||||||
The `connectListener` parameter will be added as an listener for the
|
The `connectListener` parameter will be added as a listener for the
|
||||||
['connect'][] event.
|
['connect'][] event once.
|
||||||
|
|
||||||
## Class: net.Server
|
## Class: net.Server
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user