Fork me on GitHub
摘要: 这一篇我们用epoll改写之前写的简单聊天室,Epoll是Linux内核为处理大批量句柄而作了改进的poll。我们要用到epoll的三个函数,分别是:int epoll_create(int size); int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event); int epoll_wait(int epfd, struct epoll_event * events, int maxevents, int timeout);下面对要用到epoll的操作进行封装... 阅读全文
posted @ 2012-09-12 14:00 _Lei 阅读(7452) 评论(4) 推荐(0) 编辑