71 fd_set inFd, outFd, excFd;
77 SourceList::iterator it;
80 int fd = it->getSource()->getfd();
83 if ( it->getMask() &
Exception ) FD_SET( fd, &excFd );
84 if ( it->getMask() && fd > maxFd ) maxFd = fd;
89 if ( timeout < 0.0 ) nEvents = select( maxFd + 1, &inFd, &outFd, &excFd, NULL );
93 tv.tv_sec = (int)floor( timeout );
94 tv.tv_usec = ( (int)floor( 1000000.0 * ( timeout - floor( timeout ) ) ) ) % 1000000;
95 nEvents = select( maxFd + 1, &inFd, &outFd, &excFd, &tv );
100 XmlRpcUtil::error(
"Error in XmlRpcDispatch::work: error in select (%d).", nEvents );
108 SourceList::iterator thisIt = it++;
110 int fd = src->
getfd();
111 unsigned newMask = (unsigned)-1;
124 else if ( newMask != (
unsigned)-1 ) { thisIt->getMask() = newMask; }
133 for ( SourceList::iterator it = closeList.begin(); it != closeList.end(); ++it )
145 std::cout <<
"XmlRpc : time out when connect to database " << std::endl;