doc: remove "note that" from dns.md
Refs: https://github.com/nodejs/remark-preset-lint-node/pull/16 PR-URL: https://github.com/nodejs/node/pull/28329 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
parent
ef3d9f11c3
commit
8b574d935c
@ -63,7 +63,7 @@ added: v8.3.0
|
|||||||
|
|
||||||
An independent resolver for DNS requests.
|
An independent resolver for DNS requests.
|
||||||
|
|
||||||
Note that creating a new resolver uses the default server settings. Setting
|
Creating a new resolver uses the default server settings. Setting
|
||||||
the servers used for a resolver using
|
the servers used for a resolver using
|
||||||
[`resolver.setServers()`][`dns.setServers()`] does not affect
|
[`resolver.setServers()`][`dns.setServers()`] does not affect
|
||||||
other resolvers:
|
other resolvers:
|
||||||
@ -212,7 +212,7 @@ of addresses supported by the current system. For example, IPv4 addresses
|
|||||||
are only returned if the current system has at least one IPv4 address
|
are only returned if the current system has at least one IPv4 address
|
||||||
configured. Loopback addresses are not considered.
|
configured. Loopback addresses are not considered.
|
||||||
- `dns.V4MAPPED`: If the IPv6 family was specified, but no IPv6 addresses were
|
- `dns.V4MAPPED`: If the IPv6 family was specified, but no IPv6 addresses were
|
||||||
found, then return IPv4 mapped IPv6 addresses. Note that it is not supported
|
found, then return IPv4 mapped IPv6 addresses. It is not supported
|
||||||
on some operating systems (e.g FreeBSD 10.1).
|
on some operating systems (e.g FreeBSD 10.1).
|
||||||
|
|
||||||
## dns.lookupService(address, port, callback)
|
## dns.lookupService(address, port, callback)
|
||||||
@ -582,7 +582,7 @@ The [`dns.setServers()`][] method affects only [`dns.resolve()`][],
|
|||||||
`dns.resolve*()` and [`dns.reverse()`][] (and specifically *not*
|
`dns.resolve*()` and [`dns.reverse()`][] (and specifically *not*
|
||||||
[`dns.lookup()`][]).
|
[`dns.lookup()`][]).
|
||||||
|
|
||||||
Note that this method works much like
|
This method works much like
|
||||||
[resolve.conf](http://man7.org/linux/man-pages/man5/resolv.conf.5.html).
|
[resolve.conf](http://man7.org/linux/man-pages/man5/resolv.conf.5.html).
|
||||||
That is, if attempting to resolve with the first server provided results in a
|
That is, if attempting to resolve with the first server provided results in a
|
||||||
`NOTFOUND` error, the `resolve()` method will *not* attempt to resolve with
|
`NOTFOUND` error, the `resolve()` method will *not* attempt to resolve with
|
||||||
@ -604,7 +604,7 @@ added: v10.6.0
|
|||||||
|
|
||||||
An independent resolver for DNS requests.
|
An independent resolver for DNS requests.
|
||||||
|
|
||||||
Note that creating a new resolver uses the default server settings. Setting
|
Creating a new resolver uses the default server settings. Setting
|
||||||
the servers used for a resolver using
|
the servers used for a resolver using
|
||||||
[`resolver.setServers()`][`dnsPromises.setServers()`] does not affect
|
[`resolver.setServers()`][`dnsPromises.setServers()`] does not affect
|
||||||
other resolvers:
|
other resolvers:
|
||||||
@ -1032,7 +1032,7 @@ An error will be thrown if an invalid address is provided.
|
|||||||
The `dnsPromises.setServers()` method must not be called while a DNS query is in
|
The `dnsPromises.setServers()` method must not be called while a DNS query is in
|
||||||
progress.
|
progress.
|
||||||
|
|
||||||
Note that this method works much like
|
This method works much like
|
||||||
[resolve.conf](http://man7.org/linux/man-pages/man5/resolv.conf.5.html).
|
[resolve.conf](http://man7.org/linux/man-pages/man5/resolv.conf.5.html).
|
||||||
That is, if attempting to resolve with the first server provided results in a
|
That is, if attempting to resolve with the first server provided results in a
|
||||||
`NOTFOUND` error, the `resolve()` method will *not* attempt to resolve with
|
`NOTFOUND` error, the `resolve()` method will *not* attempt to resolve with
|
||||||
@ -1083,8 +1083,8 @@ as most other programs. For instance, [`dns.lookup()`][] will almost always
|
|||||||
resolve a given name the same way as the `ping` command. On most POSIX-like
|
resolve a given name the same way as the `ping` command. On most POSIX-like
|
||||||
operating systems, the behavior of the [`dns.lookup()`][] function can be
|
operating systems, the behavior of the [`dns.lookup()`][] function can be
|
||||||
modified by changing settings in nsswitch.conf(5) and/or resolv.conf(5),
|
modified by changing settings in nsswitch.conf(5) and/or resolv.conf(5),
|
||||||
but note that changing these files will change the behavior of _all other
|
but changing these files will change the behavior of all other
|
||||||
programs running on the same operating system_.
|
programs running on the same operating system.
|
||||||
|
|
||||||
Though the call to `dns.lookup()` will be asynchronous from JavaScript's
|
Though the call to `dns.lookup()` will be asynchronous from JavaScript's
|
||||||
perspective, it is implemented as a synchronous call to getaddrinfo(3) that runs
|
perspective, it is implemented as a synchronous call to getaddrinfo(3) that runs
|
||||||
@ -1092,7 +1092,7 @@ on libuv's threadpool. This can have surprising negative performance
|
|||||||
implications for some applications, see the [`UV_THREADPOOL_SIZE`][]
|
implications for some applications, see the [`UV_THREADPOOL_SIZE`][]
|
||||||
documentation for more information.
|
documentation for more information.
|
||||||
|
|
||||||
Note that various networking APIs will call `dns.lookup()` internally to resolve
|
Various networking APIs will call `dns.lookup()` internally to resolve
|
||||||
host names. If that is an issue, consider resolving the hostname to an address
|
host names. If that is an issue, consider resolving the hostname to an address
|
||||||
using `dns.resolve()` and using the address instead of a host name. Also, some
|
using `dns.resolve()` and using the address instead of a host name. Also, some
|
||||||
networking APIs (such as [`socket.connect()`][] and [`dgram.createSocket()`][])
|
networking APIs (such as [`socket.connect()`][] and [`dgram.createSocket()`][])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user