sock

Module Contents

Classes

BaseSocket(self,address,conf,log,fd=None)
TCPSocket()
TCP6Socket()
UnixSocket(self,addr,conf,log,fd=None)

Functions

_sock_type(addr)
create_sockets(conf,log,fds=None) Create a new socket for the configured addresses or file descriptors.
close_sockets(listeners,unlink=True)
class BaseSocket(address, conf, log, fd=None)
__init__(address, conf, log, fd=None)
__str__()
__getattr__(name)
set_options(sock, bound=False)
bind(sock)
close()
class TCPSocket
__str__()
set_options(sock, bound=False)
class TCP6Socket
__str__()
class UnixSocket(addr, conf, log, fd=None)
__init__(addr, conf, log, fd=None)
__str__()
bind(sock)
_sock_type(addr)
create_sockets(conf, log, fds=None)

Create a new socket for the configured addresses or file descriptors.

If a configured address is a tuple then a TCP socket is created. If it is a string, a Unix socket is created. Otherwise, a TypeError is raised.

close_sockets(listeners, unlink=True)