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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
112 | 112 |
113 typedef std::vector<ProtocolAddress> PortList; | 113 typedef std::vector<ProtocolAddress> PortList; |
114 // TODO(deadbeef): Rename to TurnServerConfig. | 114 // TODO(deadbeef): Rename to TurnServerConfig. |
115 struct RelayServerConfig { | 115 struct RelayServerConfig { |
116 RelayServerConfig(RelayType type) : type(type) {} | 116 RelayServerConfig(RelayType type) : type(type) {} |
117 | 117 |
118 RelayServerConfig(const std::string& address, | 118 RelayServerConfig(const std::string& address, |
119 int port, | 119 int port, |
120 const std::string& username, | 120 const std::string& username, |
121 const std::string& password, | 121 const std::string& password, |
122 ProtocolType proto) | |
123 : RelayServerConfig(address, | |
124 port, | |
125 username, | |
126 password, | |
127 proto, | |
128 PROTO_FLAG_NONE) {} | |
129 | |
130 RelayServerConfig(const std::string& address, | |
131 int port, | |
132 const std::string& username, | |
133 const std::string& password, | |
122 ProtocolType proto, | 134 ProtocolType proto, |
123 bool secure) | 135 ProtocolFlags flags) |
Taylor Brandstetter
2016/12/08 01:36:40
You should keep this constructor around for backwa
hnsl1
2016/12/12 16:08:13
Done.
| |
124 : type(RELAY_TURN), credentials(username, password) { | 136 : type(RELAY_TURN), credentials(username, password) { |
125 ports.push_back( | 137 ports.push_back( |
126 ProtocolAddress(rtc::SocketAddress(address, port), proto, secure)); | 138 ProtocolAddress(rtc::SocketAddress(address, port), proto, flags)); |
127 } | 139 } |
128 | 140 |
129 bool operator==(const RelayServerConfig& o) const { | 141 bool operator==(const RelayServerConfig& o) const { |
130 return type == o.type && ports == o.ports && credentials == o.credentials && | 142 return type == o.type && ports == o.ports && credentials == o.credentials && |
131 priority == o.priority; | 143 priority == o.priority; |
132 } | 144 } |
133 bool operator!=(const RelayServerConfig& o) const { return !(*this == o); } | 145 bool operator!=(const RelayServerConfig& o) const { return !(*this == o); } |
134 | 146 |
135 RelayType type; | 147 RelayType type; |
136 PortList ports; | 148 PortList ports; |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
419 int allocated_pooled_session_count_ = 0; | 431 int allocated_pooled_session_count_ = 0; |
420 std::deque<std::unique_ptr<PortAllocatorSession>> pooled_sessions_; | 432 std::deque<std::unique_ptr<PortAllocatorSession>> pooled_sessions_; |
421 bool prune_turn_ports_ = false; | 433 bool prune_turn_ports_ = false; |
422 | 434 |
423 webrtc::MetricsObserverInterface* metrics_observer_ = nullptr; | 435 webrtc::MetricsObserverInterface* metrics_observer_ = nullptr; |
424 }; | 436 }; |
425 | 437 |
426 } // namespace cricket | 438 } // namespace cricket |
427 | 439 |
428 #endif // WEBRTC_P2P_BASE_PORTALLOCATOR_H_ | 440 #endif // WEBRTC_P2P_BASE_PORTALLOCATOR_H_ |
OLD | NEW |