epoll的总结之一基本的参数设置
http://fpcfjf.blog.163.com/blog/static/55469793201452095738566/?suggestedreading&wumii
epoll的总结之四LT和ET使用EPOLLONESHOT
http://fpcfjf.blog.163.com/blog/static/5546979320146193451475/
http://blog.csdn.net/xiajun07061225/article/details/9250579
for( ; ; ) { nfds = epoll_wait(epfd,events,20,500); for(i=0;ifd; send( sockfd, md->ptr, strlen((char*)md->ptr), 0 ); //发送数据 ev.data.fd=sockfd; ev.events=EPOLLIN|EPOLLET; epoll_ctl(epfd,EPOLL_CTL_MOD,sockfd,&ev); //修改标识符,等待下一个循环时接收数据 } else { //其他的处理 } } }