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

Side by Side Diff: webrtc/api/peerconnection.cc

Issue 2093623004: Add config to prune TURN ports (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Partially disable the test TestEachInterfaceHasItsOwnTurnPorts 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 | « no previous file | webrtc/api/peerconnectioninterface.h » ('j') | 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 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 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 2194 matching lines...) Expand 10 before | Expand all | Expand 10 after
2205 2205
2206 port_allocator_->set_flags(portallocator_flags); 2206 port_allocator_->set_flags(portallocator_flags);
2207 // No step delay is used while allocating ports. 2207 // No step delay is used while allocating ports.
2208 port_allocator_->set_step_delay(cricket::kMinimumStepDelay); 2208 port_allocator_->set_step_delay(cricket::kMinimumStepDelay);
2209 port_allocator_->set_candidate_filter( 2209 port_allocator_->set_candidate_filter(
2210 ConvertIceTransportTypeToCandidateFilter(configuration.type)); 2210 ConvertIceTransportTypeToCandidateFilter(configuration.type));
2211 2211
2212 // Call this last since it may create pooled allocator sessions using the 2212 // Call this last since it may create pooled allocator sessions using the
2213 // properties set above. 2213 // properties set above.
2214 port_allocator_->SetConfiguration(stun_servers, turn_servers, 2214 port_allocator_->SetConfiguration(stun_servers, turn_servers,
2215 configuration.ice_candidate_pool_size); 2215 configuration.ice_candidate_pool_size,
2216 configuration.prune_turn_ports);
2216 return true; 2217 return true;
2217 } 2218 }
2218 2219
2219 bool PeerConnection::ReconfigurePortAllocator_n( 2220 bool PeerConnection::ReconfigurePortAllocator_n(
2220 const RTCConfiguration& configuration) { 2221 const RTCConfiguration& configuration) {
2221 cricket::ServerAddresses stun_servers; 2222 cricket::ServerAddresses stun_servers;
2222 std::vector<cricket::RelayServerConfig> turn_servers; 2223 std::vector<cricket::RelayServerConfig> turn_servers;
2223 if (!ParseIceServers(configuration.servers, &stun_servers, &turn_servers)) { 2224 if (!ParseIceServers(configuration.servers, &stun_servers, &turn_servers)) {
2224 return false; 2225 return false;
2225 } 2226 }
2226 port_allocator_->set_candidate_filter( 2227 port_allocator_->set_candidate_filter(
2227 ConvertIceTransportTypeToCandidateFilter(configuration.type)); 2228 ConvertIceTransportTypeToCandidateFilter(configuration.type));
2228 // Call this last since it may create pooled allocator sessions using the 2229 // Call this last since it may create pooled allocator sessions using the
2229 // candidate filter set above. 2230 // candidate filter set above.
2230 port_allocator_->SetConfiguration(stun_servers, turn_servers, 2231 port_allocator_->SetConfiguration(stun_servers, turn_servers,
2231 configuration.ice_candidate_pool_size); 2232 configuration.ice_candidate_pool_size,
2233 configuration.prune_turn_ports);
2232 return true; 2234 return true;
2233 } 2235 }
2234 2236
2235 } // namespace webrtc 2237 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/api/peerconnectioninterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698