Skip to content

Commit

Permalink
doc: remove "note that" from dns.md
Browse files Browse the repository at this point in the history
Refs: nodejs/remark-preset-lint-node#16

PR-URL: #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>
  • Loading branch information
Trott authored and targos committed Jul 2, 2019
1 parent f3b4449 commit 33d9cf5
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions doc/api/dns.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ added: v8.3.0

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
[`resolver.setServers()`][`dns.setServers()`] does not affect
other resolvers:
Expand Down Expand Up @@ -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
configured. Loopback addresses are not considered.
- `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).

## dns.lookupService(address, port, callback)
Expand Down Expand Up @@ -582,7 +582,7 @@ The [`dns.setServers()`][] method affects only [`dns.resolve()`][],
`dns.resolve*()` and [`dns.reverse()`][] (and specifically *not*
[`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).
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
Expand All @@ -604,7 +604,7 @@ added: v10.6.0

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
[`resolver.setServers()`][`dnsPromises.setServers()`] does not affect
other resolvers:
Expand Down Expand Up @@ -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
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).
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
Expand Down Expand Up @@ -1083,16 +1083,16 @@ 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
operating systems, the behavior of the [`dns.lookup()`][] function can be
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
programs running on the same operating system_.
but changing these files will change the behavior of all other
programs running on the same operating system.

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
on libuv's threadpool. This can have surprising negative performance
implications for some applications, see the [`UV_THREADPOOL_SIZE`][]
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
using `dns.resolve()` and using the address instead of a host name. Also, some
networking APIs (such as [`socket.connect()`][] and [`dgram.createSocket()`][])
Expand Down

0 comments on commit 33d9cf5

Please sign in to comment.