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>2021-03-25 22:19:30 +0300
committerJames M Snell <jasnell@gmail.com>2021-04-02 16:16:40 +0300
commit0b90d352948393e5f92ceb2ef749c643b1002a68 (patch)
treeaf799b4214eb4d855b6582fadc0f17d2e724ac84 /doc/api/net.md
parentfb9257f6597f0581592826d236cfc7196afebaca (diff)
net: add SocketAddress class
Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/37917 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'doc/api/net.md')
-rw-r--r--doc/api/net.md45
1 files changed, 45 insertions, 0 deletions
diff --git a/doc/api/net.md b/doc/api/net.md
index 50ea9ab6c45..c7f3ba56165 100644
--- a/doc/api/net.md
+++ b/doc/api/net.md
@@ -135,6 +135,51 @@ added: v15.0.0
The list of rules added to the blocklist.
+## Class: `net.SocketAddress`
+<!-- YAML
+added: REPLACEME
+-->
+### `new net.SocketAddress([options])`
+<!-- YAML
+added: REPLACEME
+-->
+
+* `options` {Object}
+ * `address` {string} The network address as either an IPv4 or IPv6 string.
+ **Default**: `'127.0.0.1'` if `family` is `'ipv4'`; `'::'` if `family` is
+ `'ipv6'`.
+ * `family` {string} One of either `'ipv4'` or 'ipv6'`. **Default**: `'ipv4'`.
+ * `flowlabel` {number} An IPv6 flow-label used only if `family` is `'ipv6'`.
+ * `port` {number} An IP port.
+
+### `socketaddress.address`
+<!-- YAML
+added: REPLACEME
+-->
+
+* Type {string}
+
+### `socketaddress.family`
+<!-- YAML
+added: REPLACEME
+-->
+
+* Type {string} Either `'ipv4'` or `'ipv6'`.
+
+### `socketaddress.flowlabel`
+<!-- YAML
+added: REPLACEME
+-->
+
+* Type {number}
+
+### `socketaddress.port`
+<!-- YAML
+added: REPLACEME
+-->
+
+* Type {number}
+
## Class: `net.Server`
<!-- YAML
added: v0.1.90