def __init__(self, reg=None, bind_ip=(), bind_unix=None, sock=None):
    '\n        Initialise a socket of the specified type, and optionally bind it to an\n        address/port.\n\n        :param tuple reg:\n            Optional tuple of (`SCIONAddr`, `int`, `SVCType`, `bool`)\n            describing respectively the address, port, SVC type, and init value\n            to register with the dispatcher. In sockets that do not connect to\n            the dispatcher, this argument is None.\n        :param tuple bind_ip:\n            Optional tuple of (`SCIONAddr`, `int`) describing the address and port\n            of the bind address. Only needed if the bind address is different from\n            the public address.\n        :param tuple bind_unix:\n            Optional tuple of (`str`, `str`) describing path to bind to, and an\n            optional description.\n        :param sock:\n            Optional socket file object to build instance around.\n        '
    self.sock = (sock or socket(AF_UNIX, SOCK_STREAM))
    self.addr = None
    if reg:
        (addr, port, init, svc) = reg
        self.registered = reg_dispatcher(self, addr, port, bind_ip, init, svc)
    if bind_unix:
        self.bind(*bind_unix)
    self.active = True
Initialise a socket of the specified type, and optionally bind it to an
address/port.

:param tuple reg:
    Optional tuple of (`SCIONAddr`, `int`, `SVCType`, `bool`)
    describing respectively the address, port, SVC type, and init value
    to register with the dispatcher. In sockets that do not connect to
    the dispatcher, this argument is None.
:param tuple bind_ip:
    Optional tuple of (`SCIONAddr`, `int`) describing the address and port
    of the bind address. Only needed if the bind address is different from
    the public address.
:param tuple bind_unix:
    Optional tuple of (`str`, `str`) describing path to bind to, and an
    optional description.
:param sock:
    Optional socket file object to build instance around.
def __init__(self, reg=None, bind_ip=(), bind_unix=None, sock=None):
    '\n        Initialise a socket of the specified type, and optionally bind it to an\n        address/port.\n\n        :param tuple reg:\n            Optional tuple of (`SCIONAddr`, `int`, `SVCType`, `bool`)\n            describing respectively the address, port, SVC type, and init value\n            to register with the dispatcher. In sockets that do not connect to\n            the dispatcher, this argument is None.\n        :param tuple bind_ip:\n            Optional tuple of (`SCIONAddr`, `int`) describing the address and port\n            of the bind address. Only needed if the bind address is different from\n            the public address.\n        :param tuple bind_unix:\n            Optional tuple of (`str`, `str`) describing path to bind to, and an\n            optional description.\n        :param sock:\n            Optional socket file object to build instance around.\n        '
    self.sock = (sock or socket(AF_UNIX, SOCK_STREAM))
    self.addr = None
    if reg:
        (addr, port, init, svc) = reg
        self.registered = reg_dispatcher(self, addr, port, bind_ip, init, svc)
    if bind_unix:
        self.bind(*bind_unix)
    self.active = True