Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2017-04-26 20:16:12 +0300
committerJames M Snell <jasnell@gmail.com>2017-04-28 17:57:11 +0300
commit71f22c842bc3f9e04ebf110461c42b07a304f352 (patch)
treed1daec18ab195946b98b0f9a1a2675e90c9c7eb2 /doc/api/dgram.md
parentf11d4a1556a5536d69c1ae524822a709689c46ac (diff)
doc: replace uses of `you` and other style nits
Replace uses of the pronouns `you` and `your` throughout the docs + other minor style nits PR-URL: https://github.com/nodejs/node/pull/12673 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Diffstat (limited to 'doc/api/dgram.md')
-rw-r--r--doc/api/dgram.md11
1 files changed, 6 insertions, 5 deletions
diff --git a/doc/api/dgram.md b/doc/api/dgram.md
index c2f6740c873..e4bd8155df3 100644
--- a/doc/api/dgram.md
+++ b/doc/api/dgram.md
@@ -301,9 +301,8 @@ The only way to know for sure that the datagram has been sent is by using a
passed as the first argument to the `callback`. If a `callback` is not given,
the error is emitted as an `'error'` event on the `socket` object.
-Offset and length are optional, but if you specify one you would need to
-specify the other. Also, they are supported only when the first
-argument is a `Buffer` or `Uint8Array`.
+Offset and length are optional but both *must* be set if either are used.
+They are supported only when the first argument is a `Buffer` or `Uint8Array`.
Example of sending a UDP packet to a random port on `localhost`;
@@ -329,8 +328,10 @@ client.send([buf1, buf2], 41234, (err) => {
});
```
-Sending multiple buffers might be faster or slower depending on your
-application and operating system: benchmark it. Usually it is faster.
+Sending multiple buffers might be faster or slower depending on the
+application and operating system. It is important to run benchmarks to
+determine the optimal strategy on a case-by-case basis. Generally speaking,
+however, sending multiple buffers is faster.
**A Note about UDP datagram size**