Added connect timeout.

In some networks, the net client could a very long time to return with an error in case the host does not exist.