mirror of
https://github.com/SantaSpeen/BeamMP-Server.git
synced 2026-06-18 09:30:54 +00:00
possible windows compiler fix, again
This commit is contained in:
+2
-4
@@ -7,10 +7,6 @@
|
|||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
using SOCKET = int;
|
|
||||||
using DWORD = unsigned long;
|
|
||||||
using PDWORD = unsigned long*;
|
|
||||||
using LPDWORD = unsigned long*;
|
|
||||||
char _getch();
|
char _getch();
|
||||||
inline void CloseSocketProper(int TheSocket) {
|
inline void CloseSocketProper(int TheSocket) {
|
||||||
shutdown(TheSocket, SHUT_RDWR);
|
shutdown(TheSocket, SHUT_RDWR);
|
||||||
@@ -21,6 +17,8 @@ inline void CloseSocketProper(int TheSocket) {
|
|||||||
// ======================= WIN32 =======================
|
// ======================= WIN32 =======================
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
#include <conio.h>
|
||||||
|
#include <winsock2.h>
|
||||||
inline void CloseSocketProper(SOCKET TheSocket) {
|
inline void CloseSocketProper(SOCKET TheSocket) {
|
||||||
shutdown(TheSocket, 2); // 2 == SD_BOTH
|
shutdown(TheSocket, 2); // 2 == SD_BOTH
|
||||||
closesocket(TheSocket);
|
closesocket(TheSocket);
|
||||||
|
|||||||
Reference in New Issue
Block a user