diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2016-10-26 07:54:20 +0200 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2016-11-18 22:01:44 +0100 |
commit | 6b1a8d03c7a8aabb20568af2e5d07c18c92a4c0c (patch) | |
tree | 0f835fefe0772f7cf926284d6353cc14d8e9bab2 /doc/api/dns.md | |
parent | c31b507b947d5b4803dd96a7c9a09fd2112085ab (diff) | |
download | android-node-v8-6b1a8d03c7a8aabb20568af2e5d07c18c92a4c0c.tar.gz android-node-v8-6b1a8d03c7a8aabb20568af2e5d07c18c92a4c0c.tar.bz2 android-node-v8-6b1a8d03c7a8aabb20568af2e5d07c18c92a4c0c.zip |
dns: implement {ttl: true} for dns.resolve6()
Add an option to retrieve the Time-To-Live of the AAAA record.
PR-URL: https://github.com/nodejs/node/pull/9296
Refs: https://github.com/nodejs/node/issues/5893
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Diffstat (limited to 'doc/api/dns.md')
-rw-r--r-- | doc/api/dns.md | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/doc/api/dns.md b/doc/api/dns.md index 2dd6fa60bc..53af8491a7 100644 --- a/doc/api/dns.md +++ b/doc/api/dns.md @@ -200,7 +200,7 @@ will contain an array of IPv4 addresses (e.g. rather than an array of strings. The TTL is expressed in seconds. * `callback` {Function} An `(err, result)` callback function. -## dns.resolve6(hostname, callback) +## dns.resolve6(hostname[, options], callback) <!-- YAML added: v0.1.16 --> @@ -209,6 +209,13 @@ Uses the DNS protocol to resolve a IPv6 addresses (`AAAA` records) for the `hostname`. The `addresses` argument passed to the `callback` function will contain an array of IPv6 addresses. +* `hostname` {String} Hostname to resolve. +* `options` {Object} + * `ttl` {Boolean} Retrieve the Time-To-Live value (TTL) of each record. + The callback receives an array of `{ address: '0:1:2:3:4:5:6:7', ttl: 60 }` + objects rather than an array of strings. The TTL is expressed in seconds. +* `callback` {Function} An `(err, result)` callback function. + ## dns.resolveCname(hostname, callback) <!-- YAML added: v0.3.2 |