摘要: 转自:https://lizijie.github.io/2018/06/17/libevent-%E5%81%8F%E7%A7%BB%E8%AF%BB%E5%8F%96%E7%BC%93%E5%AD%98evbuffer_copyout_from.html 本文约定的协议包格式 红色区域:表示5个 阅读全文
posted @ 2019-05-10 16:58 陈晓涛 阅读(726) 评论(0) 推荐(0)
摘要: 转自:http://blog.sina.com.cn/s/blog_9f1496990102vshz.html 原文:http://www.lvtao.net/c/631.html Libevent介绍 libevent是一个事件触发的网络库,适用于windows、linux、bsd等多种平台,内部 阅读全文
posted @ 2019-05-10 11:50 陈晓涛 阅读(6097) 评论(0) 推荐(0)
摘要: 转自:https://blog.csdn.net/u013229693/article/details/52168874 问题: 文档说Libevent默认是LT触发的,但这个说法并不完整。 看以下两段代码: 1. 使用struct event的读回调 voidev_read_cb(evutil_s 阅读全文
posted @ 2019-05-10 10:27 陈晓涛 阅读(509) 评论(0) 推荐(0)
摘要: 转自:https://blog.csdn.net/sdoyuxuan/article/details/81634047 buffereventbufferevent介绍 由于我们在网络通信中有很多读写的场景,所以Libevent也提供了相应的bufferevent。这些bufferevent由一个底 阅读全文
posted @ 2019-05-10 10:25 陈晓涛 阅读(1476) 评论(0) 推荐(0)