摘要:
epoll poll模型每次调用poll函数都需要把监听套接字与已连接套接字所感兴趣的事件数组 拷贝到内核(效率低) 函数原型: #include <sys/epoll.h> int epoll_creat(int size); int epoll_create1(int flags); int e 阅读全文
posted @ 2021-08-07 17:02
白米a
阅读(30)
评论(0)
推荐(0)
摘要:
i/o复用模型 seclect poll epoll(效率最高) 前两者类似,从poll说起 poll 函数原型 #include<poll.h> int poll(struct pollfd *fds , nfds_t nfds , int timeout); 结构体指针 监听的文件个数 超时时间 阅读全文
posted @ 2021-08-07 10:28
白米a
阅读(36)
评论(0)
推荐(0)

浙公网安备 33010602011771号