summaryrefslogtreecommitdiffstats
path: root/jingle
diff options
context:
space:
mode:
authorhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-30 23:45:20 +0000
committerhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-30 23:45:20 +0000
commit57205c3e4419aecd974b1bba3803cd2e277ede39 (patch)
tree1cd4fd2caf4bacb0669d949788e0e1f6cd785ba1 /jingle
parenta5aa6db9138cf3983679a48ab53e7d32dd927cf2 (diff)
downloadchromium_src-57205c3e4419aecd974b1bba3803cd2e277ede39.zip
chromium_src-57205c3e4419aecd974b1bba3803cd2e277ede39.tar.gz
chromium_src-57205c3e4419aecd974b1bba3803cd2e277ede39.tar.bz2
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
Diffstat (limited to 'jingle')
-rw-r--r--jingle/glue/pseudotcp_adapter.cc18
1 files changed, 14 insertions, 4 deletions
diff --git a/jingle/glue/pseudotcp_adapter.cc b/jingle/glue/pseudotcp_adapter.cc
index 91e4462..a34ddd5 100644
--- a/jingle/glue/pseudotcp_adapter.cc
+++ b/jingle/glue/pseudotcp_adapter.cc
@@ -49,6 +49,8 @@ class PseudoTcpAdapter::Core : public cricket::IPseudoTcpNotify,
void SetAckDelay(int delay_ms);
void SetNoDelay(bool no_delay);
+ void SetReceiveBufferSize(int32 size);
+ void SetSendBufferSize(int32 size);
private:
// These are invoked by the underlying Socket, and may trigger callbacks.
@@ -281,6 +283,14 @@ void PseudoTcpAdapter::Core::SetNoDelay(bool no_delay) {
pseudo_tcp_.SetOption(cricket::PseudoTcp::OPT_NODELAY, no_delay ? 1 : 0);
}
+void PseudoTcpAdapter::Core::SetReceiveBufferSize(int32 size) {
+ pseudo_tcp_.SetOption(cricket::PseudoTcp::OPT_RCVBUF, size);
+}
+
+void PseudoTcpAdapter::Core::SetSendBufferSize(int32 size) {
+ pseudo_tcp_.SetOption(cricket::PseudoTcp::OPT_SNDBUF, size);
+}
+
cricket::IPseudoTcpNotify::WriteResult PseudoTcpAdapter::Core::TcpWritePacket(
PseudoTcp* tcp,
const char* buffer,
@@ -396,15 +406,15 @@ int PseudoTcpAdapter::Write(net::IOBuffer* buffer, int buffer_size,
bool PseudoTcpAdapter::SetReceiveBufferSize(int32 size) {
DCHECK(CalledOnValidThread());
- // TODO(sergeyu): Implement support for adjustable buffer size and
- // used it here.
+
+ core_->SetReceiveBufferSize(size);
return false;
}
bool PseudoTcpAdapter::SetSendBufferSize(int32 size) {
DCHECK(CalledOnValidThread());
- // TODO(sergeyu): Implement support for adjustable buffer size and
- // used it here.
+
+ core_->SetSendBufferSize(size);
return false;
}