diff options
Diffstat (limited to 'doc/api/net.md')
-rw-r--r-- | doc/api/net.md | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/doc/api/net.md b/doc/api/net.md index b213829ffd..6e2b7386b3 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -194,14 +194,11 @@ length of the queue of pending connections. The actual length will be determined by the OS through sysctl settings such as `tcp_max_syn_backlog` and `somaxconn` on Linux. The default value of this parameter is 511 (not 512). +All [`net.Socket`][] are set to `SO_REUSEADDR` (See [socket(7)][] for details). -*Note*: - -* All [`net.Socket`][] are set to `SO_REUSEADDR` (See [socket(7)][] for - details). -* The `server.listen()` method can be called again if and only if there was an error - during the first `server.listen()` call or `server.close()` has been called. - Otherwise, an `ERR_SERVER_ALREADY_LISTEN` error will be thrown. +The `server.listen()` method can be called again if and only if there was an error +during the first `server.listen()` call or `server.close()` has been called. +Otherwise, an `ERR_SERVER_ALREADY_LISTEN` error will be thrown. One of the most common errors raised when listening is `EADDRINUSE`. This happens when another server is already listening on the requested @@ -237,7 +234,7 @@ The `handle` object can be either a server, a socket (anything with an underlying `_handle` member), or an object with an `fd` member that is a valid file descriptor. -*Note*: Listening on a file descriptor is not supported on Windows. +Listening on a file descriptor is not supported on Windows. #### server.listen(options[, callback]) <!-- YAML @@ -309,9 +306,9 @@ If `host` is omitted, the server will accept connections on the [unspecified IPv6 address][] (`::`) when IPv6 is available, or the [unspecified IPv4 address][] (`0.0.0.0`) otherwise. -*Note*: In most operating systems, listening to the -[unspecified IPv6 address][] (`::`) may cause the `net.Server` to also listen on -the [unspecified IPv4 address][] (`0.0.0.0`). +In most operating systems, listening to the [unspecified IPv6 address][] (`::`) +may cause the `net.Server` to also listen on the [unspecified IPv4 address][] +(`0.0.0.0`). ### server.listening <!-- YAML @@ -885,7 +882,7 @@ Possible signatures: * [`net.createConnection(port[, host][, connectListener])`][`net.createConnection(port, host)`] for TCP connections. -*Note*: The [`net.connect()`][] function is an alias to this function. +The [`net.connect()`][] function is an alias to this function. ### net.createConnection(options[, connectListener]) <!-- YAML |