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

Side by Side Diff: webrtc/p2p/client/basicportallocator.cc

Issue 2118873002: Add pruneTurnPorts to the java RTCConfiguration. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Merged Created 4 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 unified diff | Download patch
« no previous file with comments | « webrtc/api/android/jni/peerconnection_jni.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 void BasicPortAllocatorSession::StartGettingPorts() { 239 void BasicPortAllocatorSession::StartGettingPorts() {
240 network_thread_ = rtc::Thread::Current(); 240 network_thread_ = rtc::Thread::Current();
241 PortAllocatorSession::StartGettingPorts(); 241 PortAllocatorSession::StartGettingPorts();
242 if (!socket_factory_) { 242 if (!socket_factory_) {
243 owned_socket_factory_.reset( 243 owned_socket_factory_.reset(
244 new rtc::BasicPacketSocketFactory(network_thread_)); 244 new rtc::BasicPacketSocketFactory(network_thread_));
245 socket_factory_ = owned_socket_factory_.get(); 245 socket_factory_ = owned_socket_factory_.get();
246 } 246 }
247 247
248 network_thread_->Post(RTC_FROM_HERE, this, MSG_CONFIG_START); 248 network_thread_->Post(RTC_FROM_HERE, this, MSG_CONFIG_START);
249
250 LOG(LS_INFO) << "Pruning turn ports "
251 << (prune_turn_ports_ ? "enabled" : "disabled");
249 } 252 }
250 253
251 void BasicPortAllocatorSession::StopGettingPorts() { 254 void BasicPortAllocatorSession::StopGettingPorts() {
252 ASSERT(rtc::Thread::Current() == network_thread_); 255 ASSERT(rtc::Thread::Current() == network_thread_);
253 network_thread_->Post(RTC_FROM_HERE, this, MSG_CONFIG_STOP); 256 network_thread_->Post(RTC_FROM_HERE, this, MSG_CONFIG_STOP);
254 ClearGettingPorts(); 257 ClearGettingPorts();
255 // Note: this must be called after ClearGettingPorts because both may set the 258 // Note: this must be called after ClearGettingPorts because both may set the
256 // session state and we should set the state to STOPPED. 259 // session state and we should set the state to STOPPED.
257 PortAllocatorSession::StopGettingPorts(); 260 PortAllocatorSession::StopGettingPorts();
258 } 261 }
(...skipping 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1415 ServerAddresses servers; 1418 ServerAddresses servers;
1416 for (size_t i = 0; i < relays.size(); ++i) { 1419 for (size_t i = 0; i < relays.size(); ++i) {
1417 if (relays[i].type == turn_type && SupportsProtocol(relays[i], type)) { 1420 if (relays[i].type == turn_type && SupportsProtocol(relays[i], type)) {
1418 servers.insert(relays[i].ports.front().address); 1421 servers.insert(relays[i].ports.front().address);
1419 } 1422 }
1420 } 1423 }
1421 return servers; 1424 return servers;
1422 } 1425 }
1423 1426
1424 } // namespace cricket 1427 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/api/android/jni/peerconnection_jni.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698