Skip to content

Commit ce8b292

Browse files
Rawal27aduh95
authored andcommitted
doc: fix grammar and punctuation in dgram documentation
Signed-off-by: Rawal27 <obviouslykamal@gmail.com> PR-URL: #64957 Reviewed-By: Mike McCready <66998419+MikeMcC399@users.noreply.github.com> Reviewed-By: Tierney Cyren <hello@bnb.im> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 1b0597b commit ce8b292

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

doc/api/dgram.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ useful.
257257
A bound datagram socket keeps the Node.js process running to receive
258258
datagram messages.
259259

260-
If binding fails, an `'error'` event is generated. In rare case (e.g.
260+
If binding fails, an `'error'` event is generated. In rare cases (e.g.,
261261
attempting to bind with a closed socket), an [`Error`][] may be thrown.
262262

263263
Example of a UDP server listening on port 41234:
@@ -350,7 +350,7 @@ is called.
350350
A bound datagram socket keeps the Node.js process running to receive
351351
datagram messages.
352352

353-
If binding fails, an `'error'` event is generated. In rare case (e.g.
353+
If binding fails, an `'error'` event is generated. In rare cases (e.g.,
354354
attempting to bind with a closed socket), an [`Error`][] may be thrown.
355355

356356
An example socket listening on an exclusive port is shown below.
@@ -592,7 +592,7 @@ to exclude the socket from the reference counting that keeps the Node.js
592592
process active. The `socket.ref()` method adds the socket back to the reference
593593
counting and restores the default behavior.
594594

595-
Calling `socket.ref()` multiples times will have no additional effect.
595+
Calling `socket.ref()` multiple times will have no additional effect.
596596

597597
The `socket.ref()` method returns a reference to the socket so calls can be
598598
chained.
@@ -741,7 +741,7 @@ client.send([buf1, buf2], 41234, (err) => {
741741
});
742742
```
743743

744-
Sending multiple buffers might be faster or slower depending on the
744+
Sending multiple buffers might be faster or slower, depending on the
745745
application and operating system. Run benchmarks to
746746
determine the optimal strategy on a case-by-case basis. Generally speaking,
747747
however, sending multiple buffers is faster.
@@ -883,7 +883,7 @@ socket.bind(1234, () => {
883883
A call on a socket that is not ready to send or no longer open may throw a _Not
884884
running_ [`Error`][].
885885

886-
If `multicastInterface` can not be parsed into an IP then an _EINVAL_
886+
If `multicastInterface` cannot be parsed into an IP then an _EINVAL_
887887
[`System Error`][] is thrown.
888888

889889
On IPv4, if `multicastInterface` is a valid address but does not match any

0 commit comments

Comments
 (0)