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:
authorAntoine du Hamel <duhamelantoine1995@gmail.com>2022-04-22 01:31:09 +0300
committerMichaƫl Zasso <targos@protonmail.com>2022-04-28 07:57:21 +0300
commitd9f3f05cabecfeff7c267b9193f21b71013679b0 (patch)
tree704edb957962f0864a52982e4a698bbac63ef274 /doc/api/dgram.md
parent6fa080cb4874f4a459b862c81bca3132ad042e67 (diff)
doc: fix outdated documentation for `family` property
Refs: https://github.com/nodejs/node/pull/41431 Fixes: https://github.com/nodejs/node/issues/42787 PR-URL: https://github.com/nodejs/node/pull/42789 Reviewed-By: Beth Griggs <bgriggs@redhat.com> Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Diffstat (limited to 'doc/api/dgram.md')
-rw-r--r--doc/api/dgram.md6
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/api/dgram.md b/doc/api/dgram.md
index f9e9b6b8745..185c5f60e9a 100644
--- a/doc/api/dgram.md
+++ b/doc/api/dgram.md
@@ -113,6 +113,10 @@ exist and calls such as `socket.address()` and `socket.setTTL()` will fail.
<!-- YAML
added: v0.1.99
+changes:
+ - version: v18.0.0
+ pr-url: https://github.com/nodejs/node/pull/41431
+ description: The `family` property now returns a number instead of a string.
-->
The `'message'` event is emitted when a new datagram is available on a socket.
@@ -121,7 +125,7 @@ The event handler function is passed two arguments: `msg` and `rinfo`.
* `msg` {Buffer} The message.
* `rinfo` {Object} Remote address information.
* `address` {string} The sender address.
- * `family` {string} The address family (`'IPv4'` or `'IPv6'`).
+ * `family` {number} The address family (`4` for IPv4 or `6` for IPv6).
* `port` {number} The sender port.
* `size` {number} The message size.