summaryrefslogtreecommitdiff
path: root/p2p
diff options
context:
space:
mode:
authormallinath@webrtc.org <mallinath@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2014-01-11 01:26:23 +0000
committermallinath@webrtc.org <mallinath@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2014-01-11 01:26:23 +0000
commit3e7165a8379ea0fd37ca04af1a95dff0568c8775 (patch)
treeb77d5216b8c33aa373ab4ec2713964c34cf7de7a /p2p
parent849bc5c7da2849d7065c063dec016775e1a5db10 (diff)
downloadtalk-3e7165a8379ea0fd37ca04af1a95dff0568c8775.tar.gz
Update talk to 59410372.
R=jiayl@webrtc.org, wu@webrtc.org Review URL: https://webrtc-codereview.appspot.com/6929004 git-svn-id: http://webrtc.googlecode.com/svn/trunk/talk@5367 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'p2p')
-rw-r--r--p2p/base/portallocator.h1
-rw-r--r--p2p/client/basicportallocator.cc14
-rw-r--r--p2p/client/portallocator_unittest.cc51
3 files changed, 1 insertions, 65 deletions
diff --git a/p2p/base/portallocator.h b/p2p/base/portallocator.h
index 3481021..e2cb3fd 100644
--- a/p2p/base/portallocator.h
+++ b/p2p/base/portallocator.h
@@ -54,7 +54,6 @@ const uint32 PORTALLOCATOR_ENABLE_IPV6 = 0x40;
const uint32 PORTALLOCATOR_ENABLE_SHARED_UFRAG = 0x80;
const uint32 PORTALLOCATOR_ENABLE_SHARED_SOCKET = 0x100;
const uint32 PORTALLOCATOR_ENABLE_STUN_RETRANSMIT_ATTRIBUTE = 0x200;
-const uint32 PORTALLOCATOR_USE_LARGE_SOCKET_SEND_BUFFERS = 0x400;
const uint32 kDefaultPortAllocatorFlags = 0;
diff --git a/p2p/client/basicportallocator.cc b/p2p/client/basicportallocator.cc
index e568e75..9e2ce07 100644
--- a/p2p/client/basicportallocator.cc
+++ b/p2p/client/basicportallocator.cc
@@ -65,10 +65,6 @@ const int PHASE_SSLTCP = 3;
const int kNumPhases = 4;
-// Both these values are in bytes.
-const int kLargeSocketSendBufferSize = 128 * 1024;
-const int kNormalSocketSendBufferSize = 64 * 1024;
-
const int SHAKE_MIN_DELAY = 45 * 1000; // 45 seconds
const int SHAKE_MAX_DELAY = 90 * 1000; // 90 seconds
@@ -490,16 +486,6 @@ void BasicPortAllocatorSession::AddAllocatedPort(Port* port,
port->set_send_retransmit_count_attribute((allocator_->flags() &
PORTALLOCATOR_ENABLE_STUN_RETRANSMIT_ATTRIBUTE) != 0);
- if (content_name().compare(CN_VIDEO) == 0 &&
- component_ == cricket::ICE_CANDIDATE_COMPONENT_RTP) {
- // For video RTP alone, we set send-buffer sizes. This used to be set in the
- // engines/channels.
- int sendBufSize = (flags() & PORTALLOCATOR_USE_LARGE_SOCKET_SEND_BUFFERS)
- ? kLargeSocketSendBufferSize
- : kNormalSocketSendBufferSize;
- port->SetOption(talk_base::Socket::OPT_SNDBUF, sendBufSize);
- }
-
PortData data(port, seq);
ports_.push_back(data);
diff --git a/p2p/client/portallocator_unittest.cc b/p2p/client/portallocator_unittest.cc
index 6966e44..f3400f1 100644
--- a/p2p/client/portallocator_unittest.cc
+++ b/p2p/client/portallocator_unittest.cc
@@ -331,56 +331,7 @@ TEST_F(PortAllocatorTest, TestSetupVideoRtpPortsWithNormalSendBuffers) {
// If we Stop gathering now, we shouldn't get a second "done" callback.
session_->StopGettingPorts();
- // All ports should have normal send-buffer sizes (64KB).
- CheckSendBufferSizesOfAllPorts(64 * 1024);
-}
-
-TEST_F(PortAllocatorTest, TestSetupVideoRtpPortsWithLargeSendBuffers) {
- AddInterface(kClientAddr);
- allocator_->set_flags(allocator_->flags() |
- cricket::PORTALLOCATOR_USE_LARGE_SOCKET_SEND_BUFFERS);
- EXPECT_TRUE(CreateSession(cricket::ICE_CANDIDATE_COMPONENT_RTP,
- cricket::CN_VIDEO));
- session_->StartGettingPorts();
- ASSERT_EQ_WAIT(7U, candidates_.size(), kDefaultAllocationTimeout);
- EXPECT_TRUE(candidate_allocation_done_);
- // If we Stop gathering now, we shouldn't get a second "done" callback.
- session_->StopGettingPorts();
-
- // All ports should have large send-buffer sizes (128KB).
- CheckSendBufferSizesOfAllPorts(128 * 1024);
-}
-
-TEST_F(PortAllocatorTest, TestSetupVideoRtcpPortsAndCheckSendBuffers) {
- AddInterface(kClientAddr);
- allocator_->set_flags(allocator_->flags() |
- cricket::PORTALLOCATOR_USE_LARGE_SOCKET_SEND_BUFFERS);
- EXPECT_TRUE(CreateSession(cricket::ICE_CANDIDATE_COMPONENT_RTCP,
- cricket::CN_DATA));
- session_->StartGettingPorts();
- ASSERT_EQ_WAIT(7U, candidates_.size(), kDefaultAllocationTimeout);
- EXPECT_TRUE(candidate_allocation_done_);
- // If we Stop gathering now, we shouldn't get a second "done" callback.
- session_->StopGettingPorts();
-
- // No ports should have send-buffer size set.
- CheckSendBufferSizesOfAllPorts(-1);
-}
-
-
-TEST_F(PortAllocatorTest, TestSetupNonVideoPortsAndCheckSendBuffers) {
- AddInterface(kClientAddr);
- allocator_->set_flags(allocator_->flags() |
- cricket::PORTALLOCATOR_USE_LARGE_SOCKET_SEND_BUFFERS);
- EXPECT_TRUE(CreateSession(cricket::ICE_CANDIDATE_COMPONENT_RTP,
- cricket::CN_DATA));
- session_->StartGettingPorts();
- ASSERT_EQ_WAIT(7U, candidates_.size(), kDefaultAllocationTimeout);
- EXPECT_TRUE(candidate_allocation_done_);
- // If we Stop gathering now, we shouldn't get a second "done" callback.
- session_->StopGettingPorts();
-
- // No ports should have send-buffer size set.
+ // All ports should have unset send-buffer sizes.
CheckSendBufferSizesOfAllPorts(-1);
}