/* * Handle readable and writable file descriptors in <rfds> and <wfds>, with <nfds> set to the * maximum number of file descriptors that may be set in <rfds> or <wfds>. */ void disHandleFiles(Dispatcher *dis, int nfds, fd_set *rfds, fd_set *wfds) { int fd; for (fd = 0; fd < nfds; fd++) { if (disOwnsFd(dis, fd) && FD_ISSET(fd, rfds)) disHandleReadable(dis, fd); if (disOwnsFd(dis, fd) && FD_ISSET(fd, wfds)) disHandleWritable(dis, fd); } }
/* * Handle writable file descriptor <fd>. */ void nsHandleWritable(NS *ns, int fd) { disHandleWritable(&ns->dis, fd); }