1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-09-16 09:26:28 +02:00

Disabled Nagle algorithm for net packs.

This should significantly reduce TCP delays. On my systems this is ~120ms for server to reply to ~15ms
Possible downside - increased load on network due to possible increase in number of packages due to disabled batching
This commit is contained in:
Ivan Savenko
2014-09-21 16:43:25 +03:00
parent 6c0c03d74b
commit 380c100783

View File

@@ -45,6 +45,9 @@ CTypeList typeList;
void CConnection::init()
{
boost::asio::ip::tcp::no_delay option(true);
socket->set_option(option);
enableSmartPointerSerializatoin();
disableStackSendingByID();
registerTypes(static_cast<CISer<CConnection>&>(*this));