// 将新的到的cfd挂到树上
struct epoll_event temp;
// 设置边沿触发
temp.events = EPOLLIN | EPOLLET;
temp.data.fd = cfd;
epoll_ctl(epfd,EPOLL_CTL_ADD,cfd,&temp);
while(recv() > 0)
{
printf();
}
Linux c++(socket网络通信 & epoll的三种模式)
原文:https://www.cnblogs.com/lodger47/p/14750439.html