#include <stdio.h>
#include <stdlib.h>
#include <event2/bufferevent.h>
#include <event2/buffer.h>
#include <event2/listener.h>
#include <event2/util.h>
#include <event2/event.h>
#include <event2/event_struct.h>
#include <signal.h>
#include <unistd.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
void time_callback(evutil_socket_t fd, short event, void*arg)
{
printf("*****hello **********\n");
return;
}
int main(int argc,char *argv[])
{
struct event_base *base;
struct event *tevent;
struct event eve;
int i = 0;
//设置超时时间为3秒
struct timeval ti={3,0};
//开启debug logging 用于信息调试
event_enable_debug_logging(EVENT