OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |