实现的注意事项
尽管 dns.lookup()
和各种 dns.resolve*()/dns.reverse()
函数具有将网络名称与网络地址相关联的相同目标(反之亦然),但它们的行为却大不相同。
这些差异可能会对 Node.js 程序的行为产生微妙但重要的影响。
Although dns.lookup()
and the various dns.resolve*()/dns.reverse()
functions have the same goal of associating a network name with a network
address (or vice versa), their behavior is quite different. These differences
can have subtle but significant consequences on the behavior of Node.js
programs.