}
sock = socket(ai->ai_family, SOCK_STREAM, 0);
if (sock < 0) {
error("socket: %.100s", strerror(errno));
if (ai->next == NULL || errno != EPROTONOSUPPORT)
continue;
if (fcntl(sock, F_SETFL, O_NONBLOCK) < 0)