def port_free?(host, port)
      Addrinfo.tcp(host, port).listen.close

      true
    rescue SocketError, Errno::EADDRINUSE, Errno::EACCES
      false
    end
def port_free?(host, port)
      Addrinfo.tcp(host, port).listen.close

      true
    rescue SocketError, Errno::EADDRINUSE, Errno::EACCES
      false
    end
See if a certain port is free on a certain host