#pragma once #include "Environment.h" // ======================= UNIX ======================== #ifdef BEAMMP_LINUX #include #include #include #include #include using SOCKET = int; using DWORD = unsigned long; using PDWORD = unsigned long*; using LPDWORD = unsigned long*; char _getch(); inline void CloseSocketProper(int TheSocket) { shutdown(TheSocket, SHUT_RDWR); close(TheSocket); } #endif // unix // ======================= APPLE ======================== #ifdef BEAMMP_APPLE #include #include #include #include #include using SOCKET = int; using DWORD = unsigned long; using PDWORD = unsigned long*; using LPDWORD = unsigned long*; char _getch(); inline void CloseSocketProper(int TheSocket) { shutdown(TheSocket, SHUT_RDWR); close(TheSocket); } #endif // unix // ======================= WINDOWS ======================= #ifdef BEAMMP_WINDOWS #include #include inline void CloseSocketProper(SOCKET TheSocket) { shutdown(TheSocket, 2); // 2 == SD_BOTH closesocket(TheSocket); } #endif // WIN32