Public Member Functions | |
def | close |
def | initialize |
def | resolve |
Public Attributes | |
mapping | |
resolver |
Wraps a resolver with a mapping of overrides. This can be used to make local DNS changes (e.g. for testing) without modifying system-wide settings. The mapping can contain either host strings or host-port pairs.
Definition at line 381 of file netutil.py.
def tornado.netutil.OverrideResolver.close | ( | self | ) |
Closes the `Resolver`, freeing any resources used. .. versionadded:: 3.1
Reimplemented from tornado.netutil.Resolver.
Definition at line 393 of file netutil.py.
def tornado.netutil.OverrideResolver.initialize | ( | self, | |
resolver, | |||
mapping | |||
) |
Definition at line 389 of file netutil.py.
def tornado.netutil.OverrideResolver.resolve | ( | self, | |
host, | |||
port, | |||
family, | |||
callback | |||
) |
Resolves an address. The ``host`` argument is a string which may be a hostname or a literal IP address. Returns a `.Future` whose result is a list of (family, address) pairs, where address is a tuple suitable to pass to `socket.connect <socket.socket.connect>` (i.e. a ``(host, port)`` pair for IPv4; additional fields may be present for IPv6). If a ``callback`` is passed, it will be run with the result as an argument when it is complete.
Reimplemented from tornado.netutil.Resolver.
Definition at line 396 of file netutil.py.
Definition at line 389 of file netutil.py.
Definition at line 389 of file netutil.py.