def bind(self, addr, port=0, desc=None):
    '\n        Bind socket to the specified address & port. If `addr` is ``None``, the\n        socket will bind to all interfaces.\n\n        :param str addr: Address to bind to (can be ``None``, see above).\n        :param int port: Port to bind to.\n        :param str desc: Optional purpose of the port.\n        '
    if (addr is None):
        addr = '::'
        if (self._addr_type == AddrType.IPV4):
            addr = ''
    try:
        self.sock.bind((addr, port))
    except OSError as e:
        logging.critical('Error binding to [%s]:%s: %s', addr, port, e)
        kill_self()
    self.port = self.sock.getsockname()[1]
    if desc:
        logging.debug('%s bound to %s:%d', desc, addr, self.port)
Bind socket to the specified address & port. If `addr` is ``None``, the
socket will bind to all interfaces.

:param str addr: Address to bind to (can be ``None``, see above).
:param int port: Port to bind to.
:param str desc: Optional purpose of the port.
def bind(self, addr, port=0, desc=None):
    '\n        Bind socket to the specified address & port. If `addr` is ``None``, the\n        socket will bind to all interfaces.\n\n        :param str addr: Address to bind to (can be ``None``, see above).\n        :param int port: Port to bind to.\n        :param str desc: Optional purpose of the port.\n        '
    if (addr is None):
        addr = '::'
        if (self._addr_type == AddrType.IPV4):
            addr = 
    try:
        self.sock.bind((addr, port))
    except OSError as e:
        logging.critical('Error binding to [%s]:%s: %s', addr, port, e)
        kill_self()
    self.port = self.sock.getsockname()[1]
    if desc:
        logging.debug('%s bound to %s:%d', desc, addr, self.port)