This commit is contained in:
proller committed 2025-11-17 01:21:31 +00:00
1 parent 053542fd71
commit e52f6d23eb
4 files changed
+10 -6

No files matched your search

+7 -3
View File
@@ -20,10 +20,14 @@ namespace con
IConnection *createMTP(float timeout, bool ipv6, PeerHandler *handler)
{
constexpr auto MAX_PACKET_SIZE_SINGLEPLAYER = 65000;
// safe minimum across internet networks for ipv4 and ipv6
constexpr u32 MAX_PACKET_SIZE =
#ifdef _WIN32
512; // TODO: find working maximum?
u32 MAX_PACKET_SIZE = // simple_singleplayer_mode ? MAX_PACKET_SIZE_SINGLEPLAYER :
#if __EMSCRIPTEN__
MAX_PACKET_SIZE_SINGLEPLAYER;
#elif defined(_WIN32)
1350; // TODO: find working maximum?
#else
1350;
#endif
+1 -1
View File
@@ -861,7 +861,7 @@ void *ConnectionReceiveThread::run()
// use IPv6 minimum allowed MTU as receive buffer size as this is
// theoretical reliable upper boundary of a udp packet for all IPv6 enabled
// infrastructure
const unsigned int packet_maxsize = 1500;
const unsigned int packet_maxsize = 100050;
SharedBuffer<u8> packetdata(packet_maxsize);
bool packet_queued = true;
+1 -1
View File
@@ -52,7 +52,7 @@ ConnectionMulti::ConnectionMulti(
#endif
#if USE_WEBSOCKET
m_con_ws(std::make_shared<con_ws::Connection>(
1000000, timeout, ipv6, peerhandler)),
100000, timeout, ipv6, peerhandler)),
#endif
#if USE_WEBSOCKET_SCTP
m_con_ws_sctp(std::make_shared<con_ws_sctp::Connection>(
+1 -1
View File
@@ -842,7 +842,7 @@ void *ConnectionReceiveThread::run()
// use IPv6 minimum allowed MTU as receive buffer size as this is
// theoretical reliable upper boundary of a udp packet for all IPv6 enabled
// infrastructure
const unsigned int packet_maxsize = 1500;
const unsigned int packet_maxsize = 100050;
SharedBuffer<u8> packetdata(packet_maxsize);
bool packet_queued = true;