| 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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 | 213 |
| 214 // TODO(jiayl): remove this ctor when Chrome is updated. | 214 // TODO(jiayl): remove this ctor when Chrome is updated. |
| 215 PortConfiguration(const rtc::SocketAddress& stun_address, | 215 PortConfiguration(const rtc::SocketAddress& stun_address, |
| 216 const std::string& username, | 216 const std::string& username, |
| 217 const std::string& password); | 217 const std::string& password); |
| 218 | 218 |
| 219 PortConfiguration(const ServerAddresses& stun_servers, | 219 PortConfiguration(const ServerAddresses& stun_servers, |
| 220 const std::string& username, | 220 const std::string& username, |
| 221 const std::string& password); | 221 const std::string& password); |
| 222 | 222 |
| 223 // TODO(jiayl): remove when |stun_address| is removed. | 223 // Returns addresses of both the explicitly configured STUN servers, |
| 224 // and TURN servers that should be used as STUN servers. |
| 224 ServerAddresses StunServers(); | 225 ServerAddresses StunServers(); |
| 225 | 226 |
| 226 // Adds another relay server, with the given ports and modifier, to the list. | 227 // Adds another relay server, with the given ports and modifier, to the list. |
| 227 void AddRelay(const RelayServerConfig& config); | 228 void AddRelay(const RelayServerConfig& config); |
| 228 | 229 |
| 229 // Determines whether the given relay server supports the given protocol. | 230 // Determines whether the given relay server supports the given protocol. |
| 230 bool SupportsProtocol(const RelayServerConfig& relay, | 231 bool SupportsProtocol(const RelayServerConfig& relay, |
| 231 ProtocolType type) const; | 232 ProtocolType type) const; |
| 232 bool SupportsProtocol(RelayType turn_type, ProtocolType type) const; | 233 bool SupportsProtocol(RelayType turn_type, ProtocolType type) const; |
| 233 // Helper method returns the server addresses for the matching RelayType and | 234 // Helper method returns the server addresses for the matching RelayType and |
| 234 // Protocol type. | 235 // Protocol type. |
| 235 ServerAddresses GetRelayServerAddresses( | 236 ServerAddresses GetRelayServerAddresses( |
| 236 RelayType turn_type, ProtocolType type) const; | 237 RelayType turn_type, ProtocolType type) const; |
| 237 }; | 238 }; |
| 238 | 239 |
| 239 } // namespace cricket | 240 } // namespace cricket |
| 240 | 241 |
| 241 #endif // WEBRTC_P2P_CLIENT_BASICPORTALLOCATOR_H_ | 242 #endif // WEBRTC_P2P_CLIENT_BASICPORTALLOCATOR_H_ |
| OLD | NEW |