Skip to content

Commit

Permalink
Shunt UDP send/recieve into seperate threads to increase throughput, …
Browse files Browse the repository at this point in the history
…with large player counts we were previously getting dropped packets when recieve queue filled. Hopefully this should resolve it. Also boosted tcp backlog.
  • Loading branch information
TLeonardUK committed Mar 17, 2024
1 parent 8ab048e commit e9689e6
Show file tree
Hide file tree
Showing 3 changed files with 220 additions and 152 deletions.
4 changes: 2 additions & 2 deletions Source/Shared/Core/Network/NetConnectionTCP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
namespace {
// Maximum backlog of data in a packet streams send queue. Sending
// packets beyond this will result in disconnect.
static inline constexpr size_t k_max_send_buffer_size = 256 * 1024;
static inline constexpr size_t k_max_send_buffer_size = 512 * 1024;
};


Expand Down Expand Up @@ -111,7 +111,7 @@ bool NetConnectionTCP::Listen(int Port)
return false;
}

if (listen(Socket, 64) < 0)
if (listen(Socket, 1024) < 0)
{
ErrorS(GetName().c_str(), "Failed to listen on socket on port %i.", Port);
return false;
Expand Down
Loading

0 comments on commit e9689e6

Please sign in to comment.