浏览代码

Cork the outgoing TCP stream while we still have messages to process. This

allows more efficent use of the congestion window as we will send fewer packets.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4782 3789f03b-4d11-0410-bbf8-ca57d06f2519
tags/v1.1.90
Pierre Ossman 12 年前
父节点
当前提交
a830bec4cd
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8
    0
      common/rfb/VNCSConnectionST.cxx

+ 8
- 0
common/rfb/VNCSConnectionST.cxx 查看文件

@@ -17,6 +17,7 @@
* USA.
*/

#include <network/TcpSocket.h>
#include <rfb/VNCSConnectionST.h>
#include <rfb/LogWriter.h>
#include <rfb/Security.h>
@@ -114,10 +115,17 @@ void VNCSConnectionST::processMessages()

inProcessMessages = true;

// Get the underlying TCP layer to build large packets if we send
// multiple small responses.
network::TcpSocket::cork(sock->getFd(), true);

while (getInStream()->checkNoWait(1)) {
processMsg();
}

// Flush out everything in case we go idle after this.
network::TcpSocket::cork(sock->getFd(), false);

inProcessMessages = false;

// If there were anything requiring an update, try to send it here.

正在加载...
取消
保存