28 lines
552 B
C
28 lines
552 B
C
|
#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
|