![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
linux高性能服务器编程
帝都小蚂蚁
这个作者很懒,什么都没留下…
展开
-
I/O复用----epoll系统调用
I/O复用—-epoll系统调用#include<sys/epoll.h>//使用epoll的3个函数需加的头文件。实现:epoll与select,poll有很大的不同,epoll是使用一组函数实现的,而不是某一个函数。 亮点:内核事件表(epfd)就是在内核中建立一个表,专门放事件,底层数据结构是一个红黑树。 数据结构:要知道用了什么数据结构就要先看他涉及到的函数是怎...原创 2018-06-04 23:24:59 · 205 阅读 · 0 评论 -
I/O复用----select系统调用
I/O复用—-select系统调用先上代码(服务器) ser.c#include<stdio.h>#include<stdlib.h>#include<unistd.h>#include<string.h>#include<assert.h>#include<netinet/in.h>#include&...原创 2018-05-31 17:35:01 · 148 阅读 · 0 评论 -
poll
poll.c#define _GNU_SOURCE 1#include<stdio.h>#include<stdlib.h>#include<unistd.h>#include<string.h>#include<assert.h>#include<netinet/in.h>#include<sys/...原创 2018-07-29 20:16:21 · 237 阅读 · 0 评论