SQCSimulator2023/SQCSim-srv/define.h
2023-09-24 11:07:03 -04:00

43 lines
803 B
C++

#ifndef SRV_DEFINE_H__
#define SRV_DEFINE_H__
#include "../SQCSim-common/define.h"
#include <iostream>
#include <sstream>
#include <cctype>
#include <string>
#include <chrono>
#define MAX_CONNECTIONS 16
typedef unsigned char LogDest;
enum LOG_DEST { CONSOLE, LOGFILE, LOG_LAST };
typedef std::chrono::system_clock::time_point Timestamp;
#ifdef _WIN32
#pragma comment(lib,"wsock32.lib") // Pour pouvoir faire fonctionner le linker sans le vcxproject
#include <Windows.h>
#include <cstdio>
#include <ctime>
#define popen _popen
#define pclose _pclose
#else // Pas _WIN32
#include <unistd.h>
#include <time.h>
#include <stdio.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#define SOCKET int
#define INVALID_SOCKET -1
#define closesocket close
#endif // _WIN32
#endif