55 #include <sys/socket.h>
77 msg_panic(
"timed_connect: bad timeout: %d", timeout);
84 if (errno != EINPROGRESS)
99 error_len =
sizeof(error);
100 if (getsockopt(sock, SOL_SOCKET, SO_ERROR, (
void *) &error, &error_len) < 0)
NORETURN msg_panic(const char *fmt,...)
int sane_connect(int sock, struct sockaddr *sa, SOCKADDR_SIZE len)
int timed_connect(int sock, struct sockaddr *sa, int len, int timeout)
#define write_wait(fd, timeout)