Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(504)

Unified Diff: remoting/protocol/jingle_stream_connector.cc

Issue 7508015: Set send buffer size for the raw socket used by chromoting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « jingle/glue/channel_socket_adapter.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/jingle_stream_connector.cc
diff --git a/remoting/protocol/jingle_stream_connector.cc b/remoting/protocol/jingle_stream_connector.cc
index 01ba8f8a48d0c235490ea3fee434358b84bcaf0a..4aba28064e7f470c80a844728b7a34c14eba2116 100644
--- a/remoting/protocol/jingle_stream_connector.cc
+++ b/remoting/protocol/jingle_stream_connector.cc
@@ -98,6 +98,14 @@ void JingleStreamConnector::Connect(bool initiator,
}
bool JingleStreamConnector::EstablishTCPConnection(net::Socket* socket) {
+ // Set options for the raw socket layer.
+ // Send buffer size is set to match the PseudoTcp layer so that it can fit
+ // all the data submitted by the PseudoTcp layer.
+ socket->SetSendBufferSize(kTcpSendBufferSize);
Sergey Ulanov 2011/08/03 19:12:08 I don't think it needs to be that big. Even 10k sh
+ // TODO(hclam): We should also set the receive buffer size once we can detect
+ // the underlying socket is a TCP socket.
+
+ // Set options for the TCP layer.
jingle_glue::PseudoTcpAdapter* adapter =
new jingle_glue::PseudoTcpAdapter(socket);
adapter->SetAckDelay(kTcpAckDelayMilliseconds);
« no previous file with comments | « jingle/glue/channel_socket_adapter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698