AT&T Laboratories |
|||||
tcpSocketMTfactory.cc: line 794: #if defined(__sunos__) && defined(__sparc__) && __OSVERSION__ >= 5 // Use non-blocking connect. int fl = O_NONBLOCK; if (fcntl(sock,F_SETFL,fl) == RC_SOCKET_ERROR) { CLOSESOCKET(sock); return RC_INVALID_SOCKET; } if (connect(sock,(struct sockaddr *)&raddr, sizeof(struct sockaddr_in)) == RC_SOCKET_ERROR) { if (errno != EINPROGRESS) { CLOSESOCKET(sock); return RC_INVALID_SOCKET; } fd_set wrfds; FD_ZERO(&wrfds); FD_SET(sock,&wrfds); struct timeval t = { 30,0 }; int rc; if ((rc = select(sock+1,0,&wrfds,0,&t)) <= 0) { // Timeout, do not bother trying again. CLOSESOCKET(sock); return RC_INVALID_SOCKET; } } // Set the socket back to blocking fl = 0; if (fcntl(sock,F_SETFL,fl) == RC_SOCKET_ERROR) { CLOSESOCKET(sock); return RC_INVALID_SOCKET; } #else
Action
If you need more information, contact [email protected]. We'd like to hear from you.
For comments, suggestions and further information please contact us.
Copyright © 2001 AT&T Laboratories Cambridge