Lines Matching +full:getsockopt +full:- +full:timeouts
15 if (-1 == setsockopt(fd, level, opt, val, len)) perror_exit("setsockopt"); in xsetsockopt()
43 int fd = -1, one = 1; in xconnbind()
46 for (ai = ai_arg; ai; ai = ai->ai_next) { in xconnbind()
47 fd = (ai->ai_next ? socket : xsocket)(ai->ai_family, ai->ai_socktype, in xconnbind()
48 ai->ai_protocol); in xconnbind()
50 if (!(dobind ? bind : connect)(fd, ai->ai_addr, ai->ai_addrlen)) break; in xconnbind()
51 else if (!ai->ai_next) perror_exit_raw(dobind ? "bind" : "connect"); in xconnbind()
90 timeout -= now-then; in xpoll()
97 // half-connection shutdown. timeouts return if no data for X ms.
100 /* fix "netcat -q" fail problem */
105 long long deadline = -1; in pollinate()
115 if(getsockopt(in1, SOL_SOCKET, SO_TYPE, &type, &len) == 0) { in pollinate()
130 current_timeout = deadline - now; in pollinate()
169 pollcount--; in pollinate()
174 pollcount--; in pollinate()
202 // Close half-connection. This is needed for things like in pollinate()
207 pollcount--; in pollinate()
221 if (sa->sa_family == AF_INET) addr = &((struct sockaddr_in *)sa)->sin_addr; in ntop()
222 else addr = &((struct sockaddr_in6 *)sa)->sin6_addr; in ntop()
224 inet_ntop(sa->sa_family, addr, libbuf, sizeof(libbuf)); in ntop()
232 dest->sa_family == AF_INET ? sizeof(struct sockaddr_in) : in xsendto()