From 57205c3e4419aecd974b1bba3803cd2e277ede39 Mon Sep 17 00:00:00 2001 From: "hclam@chromium.org" Date: Sat, 30 Jul 2011 23:45:20 +0000 Subject: Increase PseudoTcp receive and send window sizes Increase the sizes of these two values so that we can cope with high latency network. BUG=91011 TEST=None Review URL: http://codereview.chromium.org/7539006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94850 0039d316-1c4b-4281-b951-d872f2087c98 --- remoting/protocol/jingle_stream_connector.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'remoting/protocol') diff --git a/remoting/protocol/jingle_stream_connector.cc b/remoting/protocol/jingle_stream_connector.cc index 86add44..849f432 100644 --- a/remoting/protocol/jingle_stream_connector.cc +++ b/remoting/protocol/jingle_stream_connector.cc @@ -32,6 +32,11 @@ const char kClientSslExporterLabel[] = "EXPORTER-remoting-channel-auth-client"; // load due to ACK traffic. const int kTcpAckDelayMilliseconds = 10; +// Values for the TCP send and receive buffer size. This should be tuned to +// accomodate high latency network but not backlog the decoding pipeline. +const int kTcpReceiveBufferSize = 256 * 1024; +const int kTcpSendBufferSize = kTcpReceiveBufferSize + 30 * 1024; + // Helper method to create a SSL client socket. net::SSLClientSocket* CreateSSLClientSocket( net::StreamSocket* socket, const std::string& der_cert, @@ -107,6 +112,8 @@ bool JingleStreamConnector::EstablishTCPConnection(net::Socket* socket) { new jingle_glue::PseudoTcpAdapter(socket); adapter->SetAckDelay(kTcpAckDelayMilliseconds); adapter->SetNoDelay(true); + adapter->SetReceiveBufferSize(kTcpReceiveBufferSize); + adapter->SetSendBufferSize(kTcpSendBufferSize); socket_.reset(adapter); int result = socket_->Connect(&tcp_connect_callback_); -- cgit v1.1