code: def _bind_socket(self, bindaddr):
          
          sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
          sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
          sock.setblocking(0)
          try:
              sock.bind(bindaddr)
          except Exception:
              self._logger.exception("Unable to bind to %s" % str(bindaddr))
              raise
          sock.listen(self.BACKLOG)
          return sock
docs: Create a listening server socket.