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

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

Issue 2378793003: Change the default relay port from GTURN to TURN. (Closed)
Patch Set: Add TODO to deprecate the constructor. Created 4 years, 2 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/p2p/client/basicportallocator.h ('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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 } 120 }
121 121
122 BasicPortAllocator::BasicPortAllocator( 122 BasicPortAllocator::BasicPortAllocator(
123 rtc::NetworkManager* network_manager, 123 rtc::NetworkManager* network_manager,
124 const ServerAddresses& stun_servers, 124 const ServerAddresses& stun_servers,
125 const rtc::SocketAddress& relay_address_udp, 125 const rtc::SocketAddress& relay_address_udp,
126 const rtc::SocketAddress& relay_address_tcp, 126 const rtc::SocketAddress& relay_address_tcp,
127 const rtc::SocketAddress& relay_address_ssl) 127 const rtc::SocketAddress& relay_address_ssl)
128 : network_manager_(network_manager), socket_factory_(NULL) { 128 : network_manager_(network_manager), socket_factory_(NULL) {
129 std::vector<RelayServerConfig> turn_servers; 129 std::vector<RelayServerConfig> turn_servers;
130 RelayServerConfig config(RELAY_GTURN); 130 RelayServerConfig config(RELAY_TURN);
131 if (!relay_address_udp.IsNil()) { 131 if (!relay_address_udp.IsNil()) {
132 config.ports.push_back(ProtocolAddress(relay_address_udp, PROTO_UDP)); 132 config.ports.push_back(ProtocolAddress(relay_address_udp, PROTO_UDP));
133 } 133 }
134 if (!relay_address_tcp.IsNil()) { 134 if (!relay_address_tcp.IsNil()) {
135 config.ports.push_back(ProtocolAddress(relay_address_tcp, PROTO_TCP)); 135 config.ports.push_back(ProtocolAddress(relay_address_tcp, PROTO_TCP));
136 } 136 }
137 if (!relay_address_ssl.IsNil()) { 137 if (!relay_address_ssl.IsNil()) {
138 config.ports.push_back(ProtocolAddress(relay_address_ssl, PROTO_SSLTCP)); 138 config.ports.push_back(ProtocolAddress(relay_address_ssl, PROTO_SSLTCP));
139 } 139 }
140 140
(...skipping 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after
1483 ServerAddresses servers; 1483 ServerAddresses servers;
1484 for (size_t i = 0; i < relays.size(); ++i) { 1484 for (size_t i = 0; i < relays.size(); ++i) {
1485 if (relays[i].type == turn_type && SupportsProtocol(relays[i], type)) { 1485 if (relays[i].type == turn_type && SupportsProtocol(relays[i], type)) {
1486 servers.insert(relays[i].ports.front().address); 1486 servers.insert(relays[i].ports.front().address);
1487 } 1487 }
1488 } 1488 }
1489 return servers; 1489 return servers;
1490 } 1490 }
1491 1491
1492 } // namespace cricket 1492 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/client/basicportallocator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698