diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-04 20:01:42 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-04 20:01:42 +0000 |
commit | b8acc61f423293b4dacba4f2ef42af0c5d0b0a28 (patch) | |
tree | fe738833745bfa04f43063b01a47c1c35b442dcc /remoting | |
parent | 9b4dd10af7b7ba6c25dfa10e7c2d71385899d41c (diff) | |
download | chromium_src-b8acc61f423293b4dacba4f2ef42af0c5d0b0a28.zip chromium_src-b8acc61f423293b4dacba4f2ef42af0c5d0b0a28.tar.gz chromium_src-b8acc61f423293b4dacba4f2ef42af0c5d0b0a28.tar.bz2 |
Set send buffer size for the raw socket used by chromoting
On Windows the send buffer size of UDP socket has a much smaller value
than the PseudoTcp's send buffer size. This causes PseudoTcp to flood
the UDP socket and results in a EWOULDBLOCK, however the code doesn't
handle this properly but simply treat the packet as lost. This happens
very often and causes Windows host to be very janky.
BUG=91495
TEST=None
Review URL: http://codereview.chromium.org/7508015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95473 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/protocol/jingle_stream_connector.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/remoting/protocol/jingle_stream_connector.cc b/remoting/protocol/jingle_stream_connector.cc index 01ba8f8..6ee07fb 100644 --- a/remoting/protocol/jingle_stream_connector.cc +++ b/remoting/protocol/jingle_stream_connector.cc @@ -98,6 +98,16 @@ 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); + // TODO(hclam): We should also set the receive buffer size once we can detect + // the underlying socket is a TCP socket. We should also investigate what + // value would gurantee that Windows's UDP socket doesn't return a EWOULDBLOCK + // error. + + // Set options for the TCP layer. jingle_glue::PseudoTcpAdapter* adapter = new jingle_glue::PseudoTcpAdapter(socket); adapter->SetAckDelay(kTcpAckDelayMilliseconds); |