摘要:
转载:http://hi.baidu.com/jingweiyoung/item/ae9fc81714be67dbbf9042b9这两天在看项目的数据结构定义及关系,遇到一些关于socket的知识点,还有一些C++的知识点,下面总结下:1.structepoll_event结构体epoll_event被用于注册所感兴趣的事件和回传所发生待处理的事件,定义如下:typedefunionepoll_data{void*ptr;intfd;__uint32_tu32;__uint64_tu64;}epoll_data_t;//保存触发事件的某个文件描述符相关的数据structepoll_event{ 阅读全文
posted @ 2013-05-24 13:52
麷飞花
阅读(865)
评论(0)
推荐(0)
摘要:
NAME epoll - I/O event notification facilitySYNOPSIS #include <sys/epoll.h>DEscrīptION epoll is a variant of poll(2) that can be used either as Edge or Level Triggered interface and scales well to large numbers of watched fds. Three system calls are provided to set up and control an epoll set: 阅读全文
posted @ 2013-05-24 13:50
麷飞花
阅读(629)
评论(0)
推荐(0)