tornado.platform.caresresolver — Asynchronous DNS Resolver using C-Ares¶

This module contains a DNS resolver using the c-ares library (and itswrapper pycares).

class tornado.platform.caresresolver.CaresResolver

Name resolver based on the c-ares library.

This is a non-blocking and non-threaded resolver. It may not producethe same results as the system resolver, but can be used for non-blockingresolution when threads cannot be used.

c-ares fails to resolve some names when family is AF_UNSPEC,so it is only recommended for use in AF_INET (i.e. IPv4). This isthe default for tornado.simple_httpclient, but other librariesmay default to AF_UNSPEC.

原文:

https://tornado-zh-cn.readthedocs.io/zh_CN/latest/caresresolver.html