花费 25 ms
libevent(十三)evhttp事件处理流程

在libevent(六)http server中,作为一个单线程http server,不仅要监听每个连接的到来,还要监听每个连接上的I/O事件。 查看源码可知,在evhttp_bind_socket中设置了accept的回调函数:accept_socket_cb ...

Sun May 28 00:08:00 CST 2017 0 5752
libevent(九)evhttp

用libevent构建一个http server非常方便,可参考libevent(六)http server。 主要涉及的一个结构体是evhttp: 值得关注的有两个成员:  callbacks,一个链表,存放用户定义的回调函数  connections,一个链表,存放所有连接 ...

Mon May 22 20:03:00 CST 2017 0 1319

 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM