mirror of
https://github.com/SantaSpeen/BeamMP-Server.git
synced 2025-07-03 18:25:24 +00:00
fix setsockopt SO_SNDTIMEO for windows, bump version number to 3.0.2, update commandline
This commit is contained in:
parent
4ff69528bd
commit
1bab3276e9
2
deps/commandline
vendored
2
deps/commandline
vendored
@ -1 +1 @@
|
||||
Subproject commit 01434c11aaf82d37a126dc70f5aa02cc523dbbb4
|
||||
Subproject commit b1da8bcb696bfa9388dca46bf0f5dd9538fc70aa
|
@ -7,12 +7,12 @@ extern TSentry Sentry;
|
||||
#include <atomic>
|
||||
#include <cstring>
|
||||
#include <deque>
|
||||
#include <filesystem>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <sstream>
|
||||
#include <zlib.h>
|
||||
#include <filesystem>
|
||||
|
||||
#include "Compat.h"
|
||||
|
||||
@ -121,7 +121,7 @@ private:
|
||||
static inline std::mutex mShutdownHandlersMutex {};
|
||||
static inline std::deque<TShutdownHandler> mShutdownHandlers {};
|
||||
|
||||
static inline Version mVersion { 3, 0, 1 };
|
||||
static inline Version mVersion { 3, 0, 2 };
|
||||
};
|
||||
|
||||
std::string ThreadName(bool DebugModeOverride = false);
|
||||
|
@ -154,10 +154,10 @@ void TNetwork::TCPServerMain() {
|
||||
beammp_warn(("Got an invalid client socket on connect! Skipping..."));
|
||||
continue;
|
||||
}
|
||||
// set timeout
|
||||
size_t SendTimeoutMS = 30 * 1000;
|
||||
// set timeout (DWORD, aka uint32_t)
|
||||
uint32_t SendTimeoutMS = 30 * 1000;
|
||||
#if defined(BEAMMP_WINDOWS)
|
||||
int ret = ::setsockopt(client.Socket, SOL_SOCKET, SO_SNDTIMEO, reinterpret_cast<const char*>(&ms), sizeof(ms));
|
||||
int ret = ::setsockopt(client.Socket, SOL_SOCKET, SO_SNDTIMEO, reinterpret_cast<const char*>(&SendTimeoutMS), sizeof(SendTimeoutMS));
|
||||
#else // POSIX
|
||||
struct timeval optval;
|
||||
optval.tv_sec = (int)(SendTimeoutMS / 1000);
|
||||
|
Loading…
x
Reference in New Issue
Block a user