libevent源码分析1 ----evnet相关结构体分析
位于代码event-internal.h中。
event_base类似事件的集合,你创建一个事件,必须将该事件指定一个集合。
struct event_base {
50 const struct eventop *evsel; /*evsel和evbase就类比与类和对象之间的关系,evbase是evsel的
51 一个具体实现,指在这里使用的复用模型*/
52 void *evbase;
53 /*这个event_base所关注的事件数目*/
54 int event_count; /* counts number of total events */
55 /*这个event_base中激活事件的数目*/
56 int event_count_active; /* counts number of active events */
57 /*判断循环退出的条件*/
58 int event_gotterm; /* Set to terminate loop */
59 int event_break; /* Set to terminate loop immediately */
60
61 /* active event management */
62 /*只存事件链表,执行存放不同优先级事件的链,所以使用二级指针,激活事件的链表*/
63 struct event_list **activequeues;
64 /*事件链表的数目,数据是根据优先级来决定的*/
65 int nactivequeues;
66
67 /* signal handling info */
68 /*处理信号事件的单独结构体*/
69 struct evsignal_info sig;
70 /*存放所有事件的链表*/
71 struct event_list eventqueue;
72 struct timeval event_tv;
73 /*管理和超时事件相关的时间小顶堆*/
74 struct min_heap timeheap;
75 /*存放时间的时间缓冲*/
76 struct timeval tv_cache;
77 };
libevent源码分析1 ----evnet相关结构体分析的更多相关文章
- [Go] gocron源码阅读-go语言的结构体
结构体类型 type 名字 struct{},下面这段是github.com/urfave/cli包里的代码,声明了一个App的结构体类型 type App struct { // The name ...
- Linux内核device结构体分析
1.前言 Linux内核中的设备驱动模型,是建立在sysfs设备文件系统和kobject上的,由总线(bus).设备(device).驱动(driver)和类(class)所组成的关系结构,在底层,L ...
- FFMPEG结构体分析:AVPacket
注:写了一系列的结构体的分析的文章,在这里列一个列表: FFMPEG结构体分析:AVFrame FFMPEG结构体分析:AVFormatContext FFMPEG结构体分析:AVCodecConte ...
- FFMPEG结构体分析:AVFrame
注:写了一系列的结构体的分析的文章,在这里列一个列表: FFMPEG结构体分析:AVFrameFFMPEG结构体分析:AVFormatContextFFMPEG结构体分析:AVCodecContext ...
- [转载] FFMPEG结构体分析:AVFrame
注:写了一系列的结构体的分析的文章,在这里列一个列表: FFMPEG结构体分析:AVFrameFFMPEG结构体分析:AVFormatContextFFMPEG结构体分析:AVCodecContext ...
- FFMPEG结构体分析:AVFormatContext
注:写了一系列的结构体的分析的文章,在这里列一个列表: FFMPEG结构体分析:AVFrameFFMPEG结构体分析:AVFormatContextFFMPEG结构体分析:AVCodecContext ...
- FFMPEG结构体分析:AVStream
注:写了一系列的结构体的分析的文章,在这里列一个列表: FFMPEG结构体分析:AVFrame FFMPEG结构体分析:AVFormatContext FFMPEG结构体分析:AVCodecConte ...
- FFMPEG结构体分析:AVCodec
注:写了一系列的结构体的分析的文章,在这里列一个列表: FFMPEG结构体分析:AVFrame FFMPEG结构体分析:AVFormatContext FFMPEG结构体分析:AVCodecConte ...
- FFMPEG结构体分析:AVIOContext
注:写了一系列的结构体的分析的文章,在这里列一个列表: FFMPEG结构体分析:AVFrame FFMPEG结构体分析:AVFormatContext FFMPEG结构体分析:AVCodecConte ...
随机推荐
- IDEA使用汇总
1. 常用配置 File --> Settings (Ctrl + Alt + S) 1).提示不区分大小写: Editor-->Genereal-->Code Completion ...
- wcf问题集锦
1.处理程序“svc-Integrated”在其模块列表中有一个错误模块“ManagedPipelineHandler” HTTP 错误 404.3 - Not Found 由于扩展配置问题而无法提供 ...
- C 碎片九 预处理&位运算&文件操作
一.预处理 预处理语句:#开头的语句,在预处理阶段处理预处理语句.包括宏定义.文件包含处理.条件编译 1, 宏定义 1. 不带参数宏定义:#define 标识符 字符串 #define PI 3.1 ...
- vue-实现一个购物车结算页面
这是路由之间的跳转,传递值最好采用传参,而不是用$emit和$on,不起作用 如果实在一个页面中的兄弟组件,可以使用$emit和$on 中间件,eventBus.js 放在components目录下面 ...
- eCharts图表(polar极坐标图)
极坐标图 HTML: <div id="eChart"></div> css: #eChart{ width:500px; height:500px; } ...
- thymeleaf 模板语言简介
参考网址: https://blog.csdn.net/mlin_123/article/details/51816533 1.1 Thymeleaf 在有网络和无网络的环境下皆可运行,而且完全不需启 ...
- python logging 模块记录日志
#日志记录到多文件示例 import logging def error_log(message): file_1_1 = logging.FileHandler('error.log', 'a+', ...
- ionic文本颜色
需添加"ion-text"使"color='light'"生效 <div text-center ion-text color="light&q ...
- 完全卸载TeamViewer与重新安装TeamViewer 7(含单文件版V12主控端)
卸载teamviewer: 删除:%AppData%\Teamviewer.%tmp%\TeamViewer.C:\Users\Administrator\AppData\Local\TeamView ...
- IOS 一些好的框架和 技术大牛的博客
http://blog.csdn.net/rodulf/article/details/51871093 比较好的框架链接: http://www.jianshu.com/p/9216c561b0f ...