Skip to content

Commit fbaef40

Browse files
Josh Gummersallbnoordhuis
Josh Gummersall
authored andcommitted
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: #901 PR-URL: #1717 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
1 parent 6edc900 commit fbaef40

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

doc/api/net.markdown

+6-6
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ The options are passed to both the ['net.Socket'](#net_class_net_socket)
6767
constructor and the ['socket.connect'](#net_socket_connect_options_connectlistener)
6868
method.
6969

70-
The `connectListener` parameter will be added as an listener for the
71-
['connect'][] event.
70+
The `connectListener` parameter will be added as a listener for the
71+
['connect'][] event once.
7272

7373
Here is an example of a client of the previously described echo server:
7474

@@ -100,8 +100,8 @@ supplied `port` and `host`.
100100

101101
If `host` is omitted, `'localhost'` will be assumed.
102102

103-
The `connectListener` parameter will be added as an listener for the
104-
['connect'][] event.
103+
The `connectListener` parameter will be added as a listener for the
104+
['connect'][] event once.
105105

106106
## net.connect(path[, connectListener])
107107
## net.createConnection(path[, connectListener])
@@ -110,8 +110,8 @@ A factory function, which returns a new unix
110110
['net.Socket'](#net_class_net_socket) and automatically connects to the
111111
supplied `path`.
112112

113-
The `connectListener` parameter will be added as an listener for the
114-
['connect'][] event.
113+
The `connectListener` parameter will be added as a listener for the
114+
['connect'][] event once.
115115

116116
## Class: net.Server
117117

0 commit comments

Comments
 (0)