nonblocking

    socket connect timeout

    connection 할때 timeout 처리에 관해 찾아 보는 중. nonblocking socket을 이용한 Rechard stevens의 소스가 있더군요. #include"unp.h" int connect_nonb(int sockfd, const SA *saptr, socklen_t salen, int nsec) { intflags, n, error; socklen_tlen; fd_setrset, wset; struct timevaltval; flags = Fcntl(sockfd, F_GETFL, 0); Fcntl(sockfd, F_SETFL, flags | O_NONBLOCK); error = 0; if ( (n = connect(sockfd, (struct sockaddr *) saptr, sal..