Client now loops through the linked list of results returned by getaddrinfo and connects to the first one it can.