浏览代码

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
Ivan Savenko 11 年之前
父节点
当前提交
380c100783
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      lib/Connection.cpp

+ 3 - 0
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<CISer<CConnection>&>(*this));