From 380c100783f2de3ec57a45a2c10d953e26e5fe16 Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Sun, 21 Sep 2014 16:43:25 +0300 Subject: [PATCH] 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 --- lib/Connection.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Connection.cpp b/lib/Connection.cpp index 949e3e689..103108f0d 100644 --- a/lib/Connection.cpp +++ b/lib/Connection.cpp @@ -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&>(*this));