86 fd_set inFd, outFd, excFd;
92 SourceList::iterator it;
94 int fd = it->getSource()->getfd();
97 if (it->getMask() &
Exception) FD_SET(fd, &excFd);
98 if (it->getMask() && fd > maxFd) maxFd = fd;
104 nEvents = select(maxFd+1, &inFd, &outFd, &excFd, NULL);
108 tv.tv_sec = (int)floor(timeout);
109 tv.tv_usec = ((int)floor(1000000.0 * (timeout-floor(timeout)))) % 1000000;
110 nEvents = select(maxFd+1, &inFd, &outFd, &excFd, &tv);
115 XmlRpcUtil::error(
"Error in XmlRpcDispatch::work: error in select (%d).", nEvents);
123 SourceList::iterator thisIt = it++;
125 int fd = src->
getfd();
126 unsigned newMask = (unsigned) -1;
129 if (FD_ISSET(fd, &inFd))
131 if (FD_ISSET(fd, &outFd))
133 if (FD_ISSET(fd, &excFd))
140 }
else if (newMask != (
unsigned) -1) {
141 thisIt->getMask() = newMask;
151 for (SourceList::iterator it=closeList.begin(); it!=closeList.end(); ++it) {
161 std::cout<<
"XmlRpc : time out when connect to database " << std::endl;