FYI: http://www.wangafu.net/~nickm/libevent-book/TOC.html The Libevent Reference Manual: Preliminaries Libevent is a library for writing fast portable nonblocking IO. Its design goals are: portability speed scalability convenience The components of L…
FYI: http://www.wangafu.net/~nickm/libevent-book/TOC.html Working with events Libevent’s basic unit of operation is the event. Every event represents a set of conditions, including: A file descriptor being ready to read from or write to. A file descr…
FYI: http://www.wangafu.net/~nickm/libevent-book/Ref6_bufferevent.html Bufferevents: concepts and basics Most of the time, an application wants to perform some amount of data buffering in addition to just responding to events. When we want to write d…
FYI: http://www.wangafu.net/~nickm/libevent-book/Ref5_evutil.html Helper functions and types for Libevent Basic types #ifdef WIN32 #define evutil_socket_t intptr_t #else #define evutil_socket_t int #endif Miscellaneous compatibility types The ev_ssiz…
FYI:http://www.wangafu.net/~nickm/libevent-book/ This lib is a integral of asynchronous IO. we should change the concept from blocking PRO to nonblocking PRO. Example: A simple blocking HTTP client /* For sockaddr_in */ #include <netinet/in.h> /* Fo…
1.事件的分类 文件可写 文件可读 超时发生 信号发生 用户触发事件   2事件的生命周期        --非 persistent                                                                event_del(nopending)                                           在callback中通过event_add(重新pending)构成循环                    …
1. windows下编译及使用libevent  http://www.cnblogs.com/luxiaoxun/p/3603399.html 2.  <<libevent学习资料>> http://blog.csdn.net/tge7618291/article/details/7698813 3. 源代码编译安装Memcache及libevent库依赖性的解决实例 (安装libevent) http://www.tudou.com/programs/view/yY21BGw…
Libevent is a library for writing fast portable nonblocking IO. libevent是一个为编写快速可移植的非阻塞IO程序而设计的. libevent组件 libevent包括了以下组件: 1. evutil Generic functionality to abstract out the differences between different platforms' networking implementations. 用于抽象…
目录 00. 目录 01. 简介 02. 创建默认的event_base 03. 创建复杂的event_base 3.1 event_config_new函数 3.2 event_base_new_with_config函数 3.3 event_config_free函数 3.4 event_config_avoid_method函数 3.5 event_config_require_features函数 3.6 event_config_set_flag函数 3.7 event_config_…
Libevents的基本操作单元是event,每一个event代表了一些条件的集合,这些条件包括: 文件描述符已经准备好读或写 文件描述符正在变为就绪,准备好读或写(仅限于边沿触发) 超时事件 信号发生 用户触发事件 events都有类似的生命周期.一旦调用Libevent函数创建好event,并将其关联到一个event_base之后,他就是"已初始化"状态(initialized).这种状态下,可以进行add操作,将其状态变为base中的"挂起"状态(pendin…