Linux中IO多路复用技术之select(),epoll
来源:互联网 发布:机器人虚拟仿真软件 编辑:程序博客网 时间:2024/06/05 06:32
1.参考学习资料
https://www.ibm.com/developerworks/cn/linux/l-cn-edntwk/
http://blog.csdn.net/piaojun_pj/article/details/5991968
2.epoll
常见的IO多路复用技术包括select(),poll(),epoll. 于Linux 2.5.44首度登场的epoll是Linux核心的可扩展I/O事件通知机制。它设计目的只在取代既有POSIX select(2)与poll(2)
系统函式,让需要大量操作文件描述符的程序得以发挥更优异的性能(举例来说:旧有的系统函式所花费的时间复杂度为O(n),epoll则耗时O(1))。epoll与FreeBSD的kqueue类
似。
epoll的操作接口有:
(1)int epoll_create(int size);
创建一个epoll对象,并返回该epoll自身的文件描述符,参数size表示的是该epoll可以管理的fd的上限。
(2)int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event);
epoll的事件注册函数,将某个fd在epoll上注册,修改或者删除等操作。
(3)int epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout);
等待已经注册到epoll的事件被触发或者获取事件触发超时。
- Linux中IO多路复用技术之select(),epoll
- linux网络编程 IO多路复用 select epoll
- IO多路复用(select, epoll)
- IO多路复用之select poll epoll
- IO多路复用之select、poll以及epoll
- IO多路复用之select、poll、epoll详解
- IO 多路复用之 select、poll、epoll 详解
- io多路复用之select,poll,epoll总结
- IO多路复用之select、poll、epoll详解
- IO多路复用之select、poll、epoll详解
- IO多路复用之select、poll、epoll详解
- IO多路复用之select、poll、epoll详解
- IO多路复用之select/poll/epoll
- IO多路复用之select、poll、epoll详解
- 浅谈IO的多路复用技术之一(select和epoll实质)
- IO多路复用(select poll epoll)
- IO多路复用:select、poll、epoll
- Linux IO多路复用之epoll网络编程
- 解决mysql 1040错误Too many connections的方法
- 预测游戏开发人才的未来趋势
- js与json交互理论和示例
- MINI2440 kernel starting
- PRML-系列一之1.2.2~1.2.3
- Linux中IO多路复用技术之select(),epoll
- github使用小结--本地建库并同步到github
- uva 1493(并查集)
- MD5加密与网络数据安全
- SELinux的功能熟悉
- U盘+GRUB2引导PE或linux镜像
- 第68题 Single Number II
- linxu bash修改终端提示颜色
- 简易的串口操作,尚未调试