Browse Source

doc: fix minor typos in net.md

About writable, not 'reads' but 'writes' is correct.
And also, add parentheses because server.getConnections is function.

PR-URL: https://github.com/nodejs/node/pull/14502
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
v6
Daiki Arai 7 years ago
committed by Anna Henningsen
parent
commit
e95acebf3a
No known key found for this signature in database GPG Key ID: D8B9F5AEAE84E4CF
  1. 10
      doc/api/net.md

10
doc/api/net.md

@ -155,7 +155,7 @@ The number of concurrent connections on the server.
This becomes `null` when sending a socket to a child with This becomes `null` when sending a socket to a child with
[`child_process.fork()`][]. To poll forks and get current number of active [`child_process.fork()`][]. To poll forks and get current number of active
connections use asynchronous `server.getConnections` instead. connections use asynchronous [`server.getConnections()`][] instead.
### server.getConnections(callback) ### server.getConnections(callback)
<!-- YAML <!-- YAML
@ -232,7 +232,7 @@ Start a server listening for connections on a given `handle` that has
already been bound to a port, a UNIX domain socket, or a Windows named pipe. already been bound to a port, a UNIX domain socket, or a Windows named pipe.
The `handle` object can be either a server, a socket (anything with an The `handle` object can be either a server, a socket (anything with an
underlying `_handle` member), or an object with a `fd` member that is a underlying `_handle` member), or an object with an `fd` member that is a
valid file descriptor. valid file descriptor.
*Note*: Listening on a file descriptor is not supported on Windows. *Note*: Listening on a file descriptor is not supported on Windows.
@ -366,7 +366,7 @@ A `net.Socket` can be created by the user and used directly to interact with
a server. For example, it is returned by [`net.createConnection()`][], a server. For example, it is returned by [`net.createConnection()`][],
so the user can use it to talk to the server. so the user can use it to talk to the server.
It can also be be created by Node.js and passed to the user when a connection It can also be created by Node.js and passed to the user when a connection
is received. For example, it is passed to the listeners of a is received. For example, it is passed to the listeners of a
[`'connection'`][] event emitted on a [`net.Server`][], so the user can use [`'connection'`][] event emitted on a [`net.Server`][], so the user can use
it to interact with the client. it to interact with the client.
@ -384,9 +384,9 @@ Creates a new socket object.
* `allowHalfOpen` {boolean} Indicates whether half-opened TCP connections * `allowHalfOpen` {boolean} Indicates whether half-opened TCP connections
are allowed. See [`net.createServer()`][] and the [`'end'`][] event are allowed. See [`net.createServer()`][] and the [`'end'`][] event
for details. Defaults to `false`. for details. Defaults to `false`.
* `readable` {boolean} Allow reads on the socket when a `fd` is passed, * `readable` {boolean} Allow reads on the socket when an `fd` is passed,
otherwise ignored. Defaults to `false`. otherwise ignored. Defaults to `false`.
* `writable` {boolean} Allow reads on the socket when a `fd` is passed, * `writable` {boolean} Allow writes on the socket when an `fd` is passed,
otherwise ignored. Defaults to `false`. otherwise ignored. Defaults to `false`.
* Returns: {net.Socket} * Returns: {net.Socket}

Loading…
Cancel
Save