doc: remove use of "random port" re dgram send
PR-URL: https://github.com/nodejs/node/pull/19620 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
parent
6572f63afb
commit
cdfe47b323
@ -319,7 +319,7 @@ the error is emitted as an `'error'` event on the `socket` object.
|
|||||||
Offset and length are optional but both *must* be set if either are used.
|
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`.
|
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`;
|
Example of sending a UDP packet to a port on `localhost`;
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const dgram = require('dgram');
|
const dgram = require('dgram');
|
||||||
@ -330,8 +330,8 @@ client.send(message, 41234, 'localhost', (err) => {
|
|||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
Example of sending a UDP packet composed of multiple buffers to a random port
|
Example of sending a UDP packet composed of multiple buffers to a port on
|
||||||
on `127.0.0.1`;
|
`127.0.0.1`;
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const dgram = require('dgram');
|
const dgram = require('dgram');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user