diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2020-05-19 23:39:58 +0300 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2020-06-01 18:07:59 +0300 |
commit | 1904e7372d9b8bdb36bcdc4492d332dd14c203d9 (patch) | |
tree | a745e5af86f1ef4794570c432a901d60d9512ae7 /doc/api/dns.md | |
parent | 77744589f627ad4f21a25a518080d5ac0d604ca1 (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.md | 16 |
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 |