doc: doc that listen can be called multiple times
Fixes: https://github.com/nodejs/node/issues/4646 PR-URL: https://github.com/nodejs/node/pull/8294 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
61fa50d298
commit
488d37b3dc
@ -681,6 +681,9 @@ This function is asynchronous. `callback` will be added as a listener for the
|
|||||||
|
|
||||||
Returns `server`.
|
Returns `server`.
|
||||||
|
|
||||||
|
*Note*: The `server.listen()` method may be called multiple times. Each
|
||||||
|
subsequent call will *re-open* the server using the provided options.
|
||||||
|
|
||||||
### server.listen(path[, callback])
|
### server.listen(path[, callback])
|
||||||
<!-- YAML
|
<!-- YAML
|
||||||
added: v0.1.90
|
added: v0.1.90
|
||||||
@ -691,6 +694,9 @@ Start a UNIX socket server listening for connections on the given `path`.
|
|||||||
This function is asynchronous. `callback` will be added as a listener for the
|
This function is asynchronous. `callback` will be added as a listener for the
|
||||||
[`'listening'`][] event. See also [`net.Server.listen(path)`][].
|
[`'listening'`][] event. See also [`net.Server.listen(path)`][].
|
||||||
|
|
||||||
|
*Note*: The `server.listen()` method may be called multiple times. Each
|
||||||
|
subsequent call will *re-open* the server using the provided options.
|
||||||
|
|
||||||
### server.listen([port][, hostname][, backlog][, callback])
|
### server.listen([port][, hostname][, backlog][, callback])
|
||||||
<!-- YAML
|
<!-- YAML
|
||||||
added: v0.1.90
|
added: v0.1.90
|
||||||
@ -713,6 +719,9 @@ parameter is 511 (not 512).
|
|||||||
This function is asynchronous. `callback` will be added as a listener for the
|
This function is asynchronous. `callback` will be added as a listener for the
|
||||||
[`'listening'`][] event. See also [`net.Server.listen(port)`][].
|
[`'listening'`][] event. See also [`net.Server.listen(port)`][].
|
||||||
|
|
||||||
|
*Note*: The `server.listen()` method may be called multiple times. Each
|
||||||
|
subsequent call will *re-open* the server using the provided options.
|
||||||
|
|
||||||
### server.listening
|
### server.listening
|
||||||
<!-- YAML
|
<!-- YAML
|
||||||
added: v5.7.0
|
added: v5.7.0
|
||||||
|
@ -173,6 +173,9 @@ server.listen({
|
|||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
*Note*: The `server.listen()` method may be called multiple times. Each
|
||||||
|
subsequent call will *re-open* the server using the provided options.
|
||||||
|
|
||||||
### server.listen(path[, backlog][, callback])
|
### server.listen(path[, backlog][, callback])
|
||||||
<!-- YAML
|
<!-- YAML
|
||||||
added: v0.1.90
|
added: v0.1.90
|
||||||
@ -210,6 +213,9 @@ double-backslashes, such as:
|
|||||||
The parameter `backlog` behaves the same as in
|
The parameter `backlog` behaves the same as in
|
||||||
[`server.listen([port][, hostname][, backlog][, callback])`][`server.listen(port, host, backlog, callback)`].
|
[`server.listen([port][, hostname][, backlog][, callback])`][`server.listen(port, host, backlog, callback)`].
|
||||||
|
|
||||||
|
*Note*: The `server.listen()` method may be called multiple times. Each
|
||||||
|
subsequent call will *re-open* the server using the provided options.
|
||||||
|
|
||||||
### server.listen([port][, hostname][, backlog][, callback])
|
### server.listen([port][, hostname][, backlog][, callback])
|
||||||
<!-- YAML
|
<!-- YAML
|
||||||
added: v0.1.90
|
added: v0.1.90
|
||||||
@ -249,6 +255,9 @@ server.on('error', (e) => {
|
|||||||
|
|
||||||
(Note: All sockets in Node.js are set `SO_REUSEADDR`.)
|
(Note: All sockets in Node.js are set `SO_REUSEADDR`.)
|
||||||
|
|
||||||
|
*Note*: The `server.listen()` method may be called multiple times. Each
|
||||||
|
subsequent call will *re-open* the server using the provided options.
|
||||||
|
|
||||||
### server.listening
|
### server.listening
|
||||||
<!-- YAML
|
<!-- YAML
|
||||||
added: v5.7.0
|
added: v5.7.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user