摘要: 1 #include <sys/epoll.h> 2 int epoll_create(int size);//创建一个epfd,标识内核中的事件表 3 int epoll_ctl(int epfd, int op,int fd, struct epoll_event *event);//向epfd 阅读全文
posted @ 2021-01-30 18:47 封狼居胥! 阅读(269) 评论(0) 推荐(1) 编辑
摘要: 1 #include <poll.h> 2 int poll(struct pollfd* fds,nfds_t nfds,int timeout); fds,pollfd结构类型的数组(可变长数组,数组元素为结构体pollfd);结构体中含有三个成员变量(int,short,short),分别为文 阅读全文
posted @ 2021-01-30 14:29 封狼居胥! 阅读(165) 评论(0) 推荐(1) 编辑
摘要: 1 #include <sys/select.h> 2 int select(int maxfdps, fd_set *readset, fd_set *writeset, fd_set *exceptset,struct timeval *timeout); maxfdps:被监听的文件描述符(f 阅读全文
posted @ 2021-01-30 13:20 封狼居胥! 阅读(265) 评论(0) 推荐(1) 编辑