+ setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, (char * ) &mi, sizeof (int));
diff -urN ../ijb-zlib-11.orig/conn.c ./conn.c
--- ../ijb-zlib-11.orig/conn.c Thu Aug 3 23:38:35 2000
+++ ./conn.c Thu Jan 6 15:39:42 2005
return(inaddr.sin_addr.s_addr);
+int connect_to(char *host, int portnum, struct client_state *csp)
+ struct addrinfo *ai, *aip, aihint;
+ if (snprintf(serv, NI_MAXSERV, "%d", portnum) >= NI_MAXSERV) {
+ memset(&aihint, 0, sizeof(aihint));
+ aihint.ai_family = PF_UNSPEC;
+ aihint.ai_socktype = SOCK_STREAM;
+ rc = getaddrinfo(host, serv, &aihint, &ai);
+ for (aip = ai; aip; aip = aip->ai_next) {
+ fd = socket(aip->ai_family, aip->ai_socktype, aip->ai_protocol);
+ setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char *)&mi, sizeof(mi));
+#if !defined(_WIN32) && !defined(__BEOS__)
+ flags = fcntl(fd, F_GETFL, 0);
+ fcntl(fd, F_SETFL, flags | O_NDELAY);
+ rc = connect(fd, aip->ai_addr, aip->ai_addrlen);
+ } while (rc == -1 && errno == EINTR);
+ if (rc == -1 && errno != EINPROGRESS) {
+#if !defined(_WIN32) && !defined(__BEOS__)
+ fcntl(fd, F_SETFL, flags);
+ pfd.events = POLLOUT | POLLERR | POLLHUP;
+ if (poll(&pfd, 1, 30000) <= 0) {