Public Member Functions
tornado.netutil.Resolver Class Reference
Inheritance diagram for tornado.netutil.Resolver:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def close
def configurable_base
def configurable_default
def resolve

Detailed Description

Configurable asynchronous DNS resolver interface.

By default, a blocking implementation is used (which simply calls
`socket.getaddrinfo`).  An alternative implementation can be
chosen with the `Resolver.configure <.Configurable.configure>`
class method::

    Resolver.configure('tornado.netutil.ThreadedResolver')

The implementations of this interface included with Tornado are

* `tornado.netutil.BlockingResolver`
* `tornado.netutil.ThreadedResolver`
* `tornado.netutil.OverrideResolver`
* `tornado.platform.twisted.TwistedResolver`
* `tornado.platform.caresresolver.CaresResolver`

Definition at line 245 of file netutil.py.


Member Function Documentation

Closes the `Resolver`, freeing any resources used.

.. versionadded:: 3.1

Reimplemented in tornado.netutil.OverrideResolver, and tornado.netutil.ExecutorResolver.

Definition at line 286 of file netutil.py.

Definition at line 264 of file netutil.py.

Definition at line 268 of file netutil.py.

def tornado.netutil.Resolver.resolve (   self,
  host,
  port,
  family = socket.AF_UNSPEC,
  callback = None 
)
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 in tornado.netutil.OverrideResolver.

Definition at line 271 of file netutil.py.


The documentation for this class was generated from the following file:


rosbridge_server
Author(s): Jonathan Mace
autogenerated on Wed Sep 13 2017 03:18:20