@classmethod
  def _make_socket(cls, ip, port):
    bound_socket = bind_sockets(port, address=ip)[0]
    ip, port = bound_socket.getsockname()

    if not ip or ip == '0.0.0.0':
      ip = socket.gethostbyname(socket.gethostname())

    return bound_socket, ip, port
connect to database.
dataset/ETHPy150Open wickman/compactor/compactor/context.py/Context._make_socket--crossover with--dataset/ETHPy150Open CGATOxford/cgat/obsolete/pipeline_genomeassembly.py/connect