54 lines
994 B
C++
54 lines
994 B
C++
#pragma once
|
|
|
|
#include <chrono>
|
|
#include <cmath>
|
|
#include <cstdint>
|
|
#include <cstdlib>
|
|
#include <cstring>
|
|
#include <functional>
|
|
#include <glm/glm.hpp>
|
|
#include <gsl/gsl>
|
|
#include <limits>
|
|
#include <optional>
|
|
#include <string>
|
|
#include <string_view>
|
|
|
|
#include "spdlog/spdlog.h"
|
|
|
|
#ifdef _WIN32
|
|
#define NOMINMAX
|
|
#include <winsock2.h>
|
|
#include <ws2bth.h>
|
|
#include <ws2def.h>
|
|
#include <ws2tcpip.h>
|
|
#include <windows.h>
|
|
#define in_addr_t ULONG
|
|
#elif __linux__
|
|
#include <arpa/inet.h>
|
|
#include <errno.h>
|
|
#include <fcntl.h>
|
|
#include <netinet/in.h>
|
|
#include <sys/epoll.h>
|
|
#include <sys/eventfd.h>
|
|
#include <sys/socket.h>
|
|
#include <sys/types.h>
|
|
#include <unistd.h>
|
|
#define SOCKET int
|
|
#define INVALID_SOCKET -1
|
|
#define SOCKET_ERROR -1
|
|
#else
|
|
#error "이 플랫폼은 지원되지 않습니다."
|
|
#endif
|
|
|
|
#define MAX_BUFFERED_FRAMES (2)
|
|
|
|
#ifdef _WIN32
|
|
int close(int sock);
|
|
#elif __linux__
|
|
|
|
#else
|
|
#error "이 플랫폼은 지원되지 않습니다."
|
|
#endif
|
|
|
|
enum class SessionProtocol { UDP, TCP, TLS, QUIC };
|