mirror of
https://github.com/SantaSpeen/BeamMP-Server.git
synced 2025-08-18 11:05:37 +00:00
fix closesocketproper on windows
This commit is contained in:
parent
c1633b6401
commit
270cca40ac
@ -17,13 +17,8 @@ inline void ZeroMemory(void* dst, size_t len) {
|
||||
}
|
||||
// provides unix equivalent of closesocket call in win32
|
||||
inline void CloseSocketProper(int socket) {
|
||||
#ifndef WIN32
|
||||
shutdown(socket, SHUT_RDWR);
|
||||
close(socket);
|
||||
#else // WIN32
|
||||
shutdown(socket, SD_BOTH);
|
||||
closesocket(socket);
|
||||
#endif // WIN32
|
||||
}
|
||||
|
||||
#ifndef __try
|
||||
@ -34,4 +29,10 @@ inline void CloseSocketProper(int socket) {
|
||||
#define __except (x) /**/
|
||||
#endif
|
||||
|
||||
#else // win32
|
||||
|
||||
inline void CloseSocketProper(uint64_t socket) {
|
||||
shutdown(socket, SD_BOTH);
|
||||
closesocket(socket);
|
||||
}
|
||||
#endif // WIN32
|
||||
|
Loading…
x
Reference in New Issue
Block a user