evtimer_newevtimer_new(base, callback, NULL)用来做定时器,即当达到一定时间后调用回调函数callback,用evtimer_add激活定时器。例如:my_node->ev_expect_ping =
evtimer_new(my_node->base,expected_leader_ping_period
,(void*)my_node);
evti...
CentOS下FastDFS_V4.06安装部署CentOS系统64位x86_64GNU/Linux软件准备libevent-1.4.14b-stable.tar.gzFastDFS_v4.06.tar.gznginx-1.3.9.tar.gzfastdfs-nginx-module_v1.15.tar.gz安装libevent下载并安装#cd/usr/srcwgethttps://github.com/downloads/libevent/libevent/libeve..
分类:
其他好文 时间:
2015-03-13 02:05:56
阅读次数:
350
此文章转载自http://blog.csdn.net/fengyily/article/details/35569433(经测试正确)一、安装gcc# yum -y install gcc二、安装libevent# wget http://www.monkey.org/~provos/libeven...
分类:
系统相关 时间:
2015-03-12 14:56:36
阅读次数:
177
前言
从我们上一章《Linux c 开发 - Memcached源码分析之基于Libevent的网络模型》我们基本了解了Memcached的网络模型。这一章节,我们需要详细解读Memcached的命令解析。
我们回顾上一章发现Memcached会分成主线程和N个工作线程。主线程主要用于监听accpet客户端的Socket连接,而工作线程主要用于接管具体的客户端连接。
主线程和工作线程之间主要...
分类:
系统相关 时间:
2015-03-12 01:02:29
阅读次数:
200
1. 准备工作1.1 原材料libevent-2.0.22-stable1.2 编译环境ubuntu-12.04ndk-r9d2. 编译步骤下载解压缩libevent文件wget http://sourceforge.net/projects/levent/files/libevent/libeve...
分类:
移动开发 时间:
2015-03-10 17:05:07
阅读次数:
490
路径: $path = cocos2dx/platform/third_party
1.win32
将生成的libevent_core.lib,libevent_extras.lib放到$path/win32/libraries中
头文件event2和event-config.h 放到$path/win32/libevent中
VS中设置include p...
分类:
其他好文 时间:
2015-03-09 00:33:49
阅读次数:
206
libevent是一个常用的网络库,下面就看看在windows下面编译测试的过程吧。
一 环境
系统:win8.1
编译器:VS2013
官方下载地址:http://libevent.org/
版本:2.0.22-stable
二 编译静态库
1 解压
把上面下载到libevent-2.0.22-stable.tar.gz解压,得到libevent-2.0.22-stabl...
分类:
Windows程序 时间:
2015-03-08 17:14:26
阅读次数:
19613
一、Libevent简介libevent是一个基于事件触发的网络库,适用于windows、linux、bsd等多种平台,内部使用select、epoll、kqueue等系统调用管理事件机制。官网:http://libevent.org/特点:事件驱动,高性能;轻量级,专注于网络,不如ACE那么臃肿庞...
分类:
其他好文 时间:
2015-03-07 13:59:19
阅读次数:
180