| Index: remoting/protocol/jingle_session.cc
|
| diff --git a/remoting/protocol/jingle_session.cc b/remoting/protocol/jingle_session.cc
|
| index aac04846a5e8ba356344f7537ae490b3b8b7de94..1f4f0db6609d1f34cd2fdababa0315be62027331 100644
|
| --- a/remoting/protocol/jingle_session.cc
|
| +++ b/remoting/protocol/jingle_session.cc
|
| @@ -45,6 +45,10 @@ const char kVideoRtcpChannelName[] = "videortcp";
|
| const int kMasterKeyLength = 16;
|
| const int kChannelKeyLength = 16;
|
|
|
| +// 10 milliseconds of ACK delay is choosen to lower network latency
|
| +// and don't overwhelm the network with ACK packets.
|
| +const int kTcpAckDelayMilliseconds = 10;
|
| +
|
| // Helper method to create a SSL client socket.
|
| net::SSLClientSocket* CreateSSLClientSocket(
|
| net::StreamSocket* socket, scoped_refptr<net::X509Certificate> cert,
|
| @@ -451,7 +455,12 @@ void JingleSession::OnInitiate() {
|
| bool JingleSession::EstablishPseudoTcp(
|
| net::Socket* channel,
|
| scoped_ptr<net::StreamSocket>* stream) {
|
| - stream->reset(new jingle_glue::PseudoTcpAdapter(channel));
|
| + jingle_glue::PseudoTcpAdapter* adapter =
|
| + new jingle_glue::PseudoTcpAdapter(channel);
|
| + adapter->SetAckDelay(kTcpAckDelayMilliseconds);
|
| + adapter->SetNagling(false);
|
| +
|
| + stream->reset(adapter);
|
| int result = (*stream)->Connect(&connect_callback_);
|
| return (result == net::OK) || (result == net::ERR_IO_PENDING);
|
| }
|
|
|