Classes | Functions | Variables
tornado::netutil Namespace Reference

Classes

class  TCPServer

Functions

def add_accept_handler
def bind_sockets
def bind_unix_socket

Variables

 ssl = None

Function Documentation

def tornado.netutil.add_accept_handler (   sock,
  callback,
  io_loop = None 
)
Adds an ``IOLoop`` event handler to accept new connections on ``sock``.

When a connection is accepted, ``callback(connection, address)`` will
be run (``connection`` is a socket object, and ``address`` is the
address of the other end of the connection).  Note that this signature
is different from the ``callback(fd, events)`` signature used for
``IOLoop`` handlers.

Definition at line 304 of file netutil.py.

def tornado.netutil.bind_sockets (   port,
  address = None,
  family = socket.AF_UNSPEC,
  backlog = 128 
)
Creates listening sockets bound to the given port and address.

Returns a list of socket objects (multiple sockets are returned if
the given address maps to multiple IP addresses, which is most common
for mixed IPv4 and IPv6 use).

Address may be either an IP address or hostname.  If it's a hostname,
the server will listen on all IP addresses associated with the
name.  Address may be an empty string or None to listen on all
available interfaces.  Family may be set to either socket.AF_INET
or socket.AF_INET6 to restrict to ipv4 or ipv6 addresses, otherwise
both will be used if available.

The ``backlog`` argument has the same meaning as for
``socket.listen()``.

Definition at line 223 of file netutil.py.

def tornado.netutil.bind_unix_socket (   file,
  mode = 0600,
  backlog = 128 
)
Creates a listening unix socket.

If a socket with the given name already exists, it will be deleted.
If any other file with that name exists, an exception will be
raised.

Returns a socket object (not a list of socket objects like
`bind_sockets`)

Definition at line 274 of file netutil.py.


Variable Documentation

Definition at line 35 of file netutil.py.



rosbridge_server
Author(s): Jonathan Mace
autogenerated on Mon Oct 6 2014 06:58:14