@@ -83,9 +83,10 @@ when sockets were sent to forks.
83
83
84
84
Callback should take two arguments ` err ` and ` count ` .
85
85
86
- ### server.listen(handle[ , callback] )
86
+ ### server.listen(handle[ , backlog ] [ , callback] )
87
87
88
88
* ` handle ` {Object}
89
+ * ` backlog ` {Number}
89
90
* ` callback ` {Function}
90
91
91
92
The ` handle ` object can be set to either a server or socket (anything
@@ -102,6 +103,9 @@ This function is asynchronous. When the server has been bound,
102
103
The last parameter ` callback ` will be added as a listener for the
103
104
[ ` 'listening' ` ] [ ] event.
104
105
106
+ The parameter ` backlog ` behaves the same as in
107
+ [ ` server.listen(port, \[host\], \[backlog\], \[callback\]) ` ] [ ] .
108
+
105
109
### server.listen(options[ , callback] )
106
110
107
111
* ` options ` {Object} - Required. Supports the following properties:
@@ -114,9 +118,8 @@ The last parameter `callback` will be added as a listener for the
114
118
115
119
The ` port ` , ` host ` , and ` backlog ` properties of ` options ` , as well as the
116
120
optional callback function, behave as they do on a call to
117
- [ server.listen(port, \[ host\] , \[ backlog\] , \[ callback\] )
118
- ] ( #net_server_listen_port_hostname_backlog_callback ) . Alternatively, the ` path `
119
- option can be used to specify a UNIX socket.
121
+ [ ` server.listen(port, \[host\], \[backlog\], \[callback\]) ` ] [ ] . Alternatively,
122
+ the ` path ` option can be used to specify a UNIX socket.
120
123
121
124
If ` exclusive ` is ` false ` (default), then cluster workers will use the same
122
125
underlying handle, allowing connection handling duties to be shared. When
@@ -130,9 +133,10 @@ shown below.
130
133
exclusive: true
131
134
});
132
135
133
- ### server.listen(path[ , callback] )
136
+ ### server.listen(path[ , backlog ] [ , callback] )
134
137
135
138
* ` path ` {String}
139
+ * ` backlog ` {Number}
136
140
* ` callback ` {Function}
137
141
138
142
Start a local socket server listening for connections on the given ` path ` .
@@ -157,6 +161,9 @@ double-backslashes, such as:
157
161
net.createServer().listen(
158
162
path.join('\\\\?\\pipe', process.cwd(), 'myctl'))
159
163
164
+ The parameter ` backlog ` behaves the same as in
165
+ [ ` server.listen(port, \[host\], \[backlog\], \[callback\]) ` ] [ ] .
166
+
160
167
### server.listen(port[ , hostname] [ , backlog ] [ , callback] )
161
168
162
169
Begin accepting connections on the specified ` port ` and ` hostname ` . If the
@@ -677,6 +684,7 @@ Returns true if input is a version 6 IP address, otherwise returns false.
677
684
[ `pause()` ] : #net_socket_pause
678
685
[ `resume()` ] : #net_socket_resume
679
686
[ `server.getConnections` ] : #net_server_getconnections_callback
687
+ [ `server.listen(port, \[ host\] , \[ backlog\] , \[ callback\] )` ] : #net_server_listen_port_hostname_backlog_callback
680
688
[ `socket.connect(options\[ , connectListener\] )` ] : #net_socket_connect_options_connectlistener
681
689
[ `socket.connect` ] : #net_socket_connect_options_connectlistener
682
690
[ `socket.setTimeout()` ] : #net_socket_settimeout_timeout_callback
0 commit comments