Allow multiple hostnames to be specified.

  Also add timeout support.