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:
authorBen Noordhuis <info@bnoordhuis.nl>2020-05-19 23:39:58 +0300
committerJames M Snell <jasnell@gmail.com>2020-06-01 18:07:59 +0300
commit1904e7372d9b8bdb36bcdc4492d332dd14c203d9 (patch)
treea745e5af86f1ef4794570c432a901d60d9512ae7 /doc/api/dns.md
parent77744589f627ad4f21a25a518080d5ac0d604ca1 (diff)
dns: make dns.Resolver timeout configurable
PR-URL: https://github.com/nodejs/node/pull/33472 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Diffstat (limited to 'doc/api/dns.md')
-rw-r--r--doc/api/dns.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/api/dns.md b/doc/api/dns.md
index 7536c1eee20..96df42c980f 100644
--- a/doc/api/dns.md
+++ b/doc/api/dns.md
@@ -92,6 +92,22 @@ The following methods from the `dns` module are available:
* [`resolver.reverse()`][`dns.reverse()`]
* [`resolver.setServers()`][`dns.setServers()`]
+### `Resolver([options])`
+<!-- YAML
+added: v8.3.0
+changes:
+ - version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/33472
+ description: The constructor now accepts an `options` object.
+ The single supported option is `timeout`.
+-->
+
+Create a new resolver.
+
+* `options` {Object}
+ * `timeout` {integer} Query timeout in milliseconds, or `-1` to use the
+ default timeout.
+
### `resolver.cancel()`
<!-- YAML
added: v8.3.0