Skip to content

Commit 4e2493a

Browse files
darai0512addaleax
authored andcommitted
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: #14502 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent ddd97fe commit 4e2493a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

doc/api/net.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ The number of concurrent connections on the server.
155155

156156
This becomes `null` when sending a socket to a child with
157157
[`child_process.fork()`][]. To poll forks and get current number of active
158-
connections use asynchronous `server.getConnections` instead.
158+
connections use asynchronous [`server.getConnections()`][] instead.
159159

160160
### server.getConnections(callback)
161161
<!-- YAML
@@ -232,7 +232,7 @@ Start a server listening for connections on a given `handle` that has
232232
already been bound to a port, a UNIX domain socket, or a Windows named pipe.
233233

234234
The `handle` object can be either a server, a socket (anything with an
235-
underlying `_handle` member), or an object with a `fd` member that is a
235+
underlying `_handle` member), or an object with an `fd` member that is a
236236
valid file descriptor.
237237

238238
*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
366366
a server. For example, it is returned by [`net.createConnection()`][],
367367
so the user can use it to talk to the server.
368368

369-
It can also be be created by Node.js and passed to the user when a connection
369+
It can also be created by Node.js and passed to the user when a connection
370370
is received. For example, it is passed to the listeners of a
371371
[`'connection'`][] event emitted on a [`net.Server`][], so the user can use
372372
it to interact with the client.
@@ -384,9 +384,9 @@ Creates a new socket object.
384384
* `allowHalfOpen` {boolean} Indicates whether half-opened TCP connections
385385
are allowed. See [`net.createServer()`][] and the [`'end'`][] event
386386
for details. Defaults to `false`.
387-
* `readable` {boolean} Allow reads on the socket when a `fd` is passed,
387+
* `readable` {boolean} Allow reads on the socket when an `fd` is passed,
388388
otherwise ignored. Defaults to `false`.
389-
* `writable` {boolean} Allow reads on the socket when a `fd` is passed,
389+
* `writable` {boolean} Allow writes on the socket when an `fd` is passed,
390390
otherwise ignored. Defaults to `false`.
391391
* Returns: {net.Socket}
392392

0 commit comments

Comments
 (0)