Epoll模型详解(八)

2011-12-14 13:02:01 · 作者: · 浏览: 11844
sp;                              epoll_ctl(epfd, EPOLL_CTL_ADD, connfd, &ev);

                            } else

                                     if (events[i].events & EPOLLIN)

                                     {

                                               printf("reading!/n");

                                               if ((sockfd = events[i].data.fd) < 0) continue;

                                               new_task = new task();

                                               new_task->fd = sockfd;

                                               new_task->next = NULL;

                                               // 添加新的读任务

                                               pth