/*
- * $Id: comm.cc,v 1.236 1998/03/25 05:21:47 wessels Exp $
+ * $Id: comm.cc,v 1.237 1998/03/25 05:30:54 wessels Exp $
*
* DEBUG: section 5 Socket Functions
* AUTHOR: Harvest Derived
#if USE_ASYNC_IO
aioCheckCallbacks();
#endif
+ comm_poll_incoming();
nfds = 0;
maxfd = Biggest_FD + 1;
for (i = 0; i < maxfd; i++) {
int revents;
if (((revents = pfds[i].revents) == 0) || ((fd = pfds[i].fd) == -1))
continue;
- if (fdIsHttpOrIcp(fd)) {
- if (num < 7)
- comm_poll_incoming();
+ if (fdIsHttpOrIcp(fd))
continue;
- } else if ((incoming_counter++ & (lastinc > 0 ? 1 : 7)) == 0) {
- comm_poll_incoming();
- }
if (revents & (POLLRDNORM | POLLIN | POLLHUP | POLLERR)) {
debug(5, 6) ("comm_poll: FD %d ready for reading\n", fd);
if ((hdl = fd_table[fd].read_handler)) {
fd_table[fd].read_handler = NULL;
hdl(fd, fd_table[fd].read_data);
}
+ if ((++incoming_counter & 15) == 0)
+ comm_poll_incoming();
}
if (revents & (POLLWRNORM | POLLOUT | POLLHUP | POLLERR)) {
debug(5, 5) ("comm_poll: FD %d ready for writing\n", fd);
fd_table[fd].write_handler = NULL;
hdl(fd, fd_table[fd].write_data);
}
+ if ((++incoming_counter & 15) == 0)
+ comm_poll_incoming();
}
if (revents & POLLNVAL) {
close_handler *ch;
else
setSocketShutdownLifetimes(1);
}
+ comm_select_incoming();
nfds = 0;
maxfd = Biggest_FD + 1;
for (i = 0; i < maxfd; i++) {
for (fd = 0; fd < maxfd; fd++) {
if (!FD_ISSET(fd, &readfds) && !FD_ISSET(fd, &writefds))
continue;
- if (fdIsHttpOrIcp(fd)) {
- if (num < 7)
- comm_select_incoming();
+ if (fdIsHttpOrIcp(fd))
continue;
- } else if ((incoming_counter++ & (lastinc > 0 ? 1 : 7)) == 0) {
- comm_select_incoming();
- }
if (FD_ISSET(fd, &readfds)) {
debug(5, 6) ("comm_select: FD %d ready for reading\n", fd);
if (fd_table[fd].read_handler) {
fd_table[fd].read_handler = NULL;
hdl(fd, fd_table[fd].read_data);
}
+ if ((++incoming_counter & 15) == 0)
+ comm_select_incoming();
}
if (FD_ISSET(fd, &writefds)) {
debug(5, 5) ("comm_select: FD %d ready for writing\n", fd);
fd_table[fd].write_handler = NULL;
hdl(fd, fd_table[fd].write_data);
}
+ if ((++incoming_counter & 15) == 0)
+ comm_select_incoming();
}
lastinc = polledinc;
}