mirror of
https://github.com/SantaSpeen/BeamMP-Server.git
synced 2026-02-16 11:50:39 +00:00
CloseSocketProper instead of closesocket
This commit is contained in:
@@ -16,9 +16,14 @@ inline void ZeroMemory(void* dst, size_t len) {
|
||||
Assert(std::memset(dst, 0, len) != nullptr);
|
||||
}
|
||||
// provides unix equivalent of closesocket call in win32
|
||||
inline void closesocket(int socket) {
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user