superdog/server/tcp_server_libevent.h

28 lines
552 B
C
Raw Normal View History

2021-06-30 08:46:08 +00:00
#ifndef GENERAL_TCPSERVER_H
#define GENERAL_TCPSERVER_H
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0500
#endif
#ifdef linux
#include<sys/types.h>
#include<sys/socket.h>
#include<arpa/inet.h>
#define EVENT__HAVE_PTHREADS
#endif
extern "C"{
#include "event2/bufferevent.h"
#include "event2/buffer.h"
#include "event2/listener.h"
#include "event2/util.h"
#include "event2/event.h"
#include "event2/thread.h"
};
#include <iostream>
// #include "PackageReceiver.h"
#include <mutex>
#include <thread>
using namespace std;
#endif