Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: document what happens when listen is called multiple times #8294

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,9 @@ This function is asynchronous. `callback` will be added as a listener for the

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])
<!-- YAML
added: v0.1.90
Expand All @@ -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
[`'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])
<!-- YAML
added: v0.1.90
Expand All @@ -713,6 +719,9 @@ parameter is 511 (not 512).
This function is asynchronous. `callback` will be added as a listener for the
[`'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
<!-- YAML
added: v5.7.0
Expand Down
9 changes: 9 additions & 0 deletions doc/api/net.md
Original file line number Diff line number Diff line change
Expand Up @@ -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])
<!-- YAML
added: v0.1.90
Expand Down Expand Up @@ -210,6 +213,9 @@ double-backslashes, such as:
The parameter `backlog` behaves the same as in
[`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])
<!-- YAML
added: v0.1.90
Expand Down Expand Up @@ -249,6 +255,9 @@ server.on('error', (e) => {

(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
<!-- YAML
added: v5.7.0
Expand Down