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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 // TODO(hta): Consider if a simple vector is as good as a map. | 145 // TODO(hta): Consider if a simple vector is as good as a map. |
146 typedef std::vector<TransportChannelStats> TransportChannelStatsList; | 146 typedef std::vector<TransportChannelStats> TransportChannelStatsList; |
147 | 147 |
148 // Information about the stats of a transport. | 148 // Information about the stats of a transport. |
149 struct TransportStats { | 149 struct TransportStats { |
150 std::string transport_name; | 150 std::string transport_name; |
151 TransportChannelStatsList channel_stats; | 151 TransportChannelStatsList channel_stats; |
152 }; | 152 }; |
153 | 153 |
154 // Information about ICE configuration. | 154 // Information about ICE configuration. |
155 // TODO(deadbeef): Use rtc::Optional to represent unset values, instead of | |
156 // -1. | |
157 struct IceConfig { | 155 struct IceConfig { |
158 // The ICE connection receiving timeout value in milliseconds. | 156 // The ICE connection receiving timeout value in milliseconds. |
159 int receiving_timeout = -1; | 157 int receiving_timeout = -1; |
160 // Time interval in milliseconds to ping a backup connection when the ICE | 158 // Time interval in milliseconds to ping a backup connection when the ICE |
161 // channel is strongly connected. | 159 // channel is strongly connected. |
162 int backup_connection_ping_interval = -1; | 160 int backup_connection_ping_interval = -1; |
163 // If true, the most recent port allocator session will keep on running. | 161 // If true, the most recent port allocator session will keep on running. |
164 bool gather_continually = false; | 162 bool gather_continually = false; |
165 | 163 |
166 // Whether we should prioritize Relay/Relay candidate when nothing | 164 // Whether we should prioritize Relay/Relay candidate when nothing |
167 // is writable yet. | 165 // is writable yet. |
168 bool prioritize_most_likely_candidate_pairs = false; | 166 bool prioritize_most_likely_candidate_pairs = false; |
169 | 167 |
170 // Writable connections are pinged at a slower rate once stablized. | 168 // Writable connections are pinged at a slower rate once stablized. |
171 int stable_writable_connection_ping_interval = -1; | 169 int stable_writable_connection_ping_interval = -1; |
172 | 170 |
173 // If set to true, this means the ICE transport should presume TURN-to-TURN | |
174 // candidate pairs will succeed, even before a binding response is received. | |
175 bool presume_writable_when_fully_relayed = false; | |
176 | |
177 IceConfig() {} | 171 IceConfig() {} |
178 IceConfig(int receiving_timeout_ms, | 172 IceConfig(int receiving_timeout_ms, |
179 int backup_connection_ping_interval, | 173 int backup_connection_ping_interval, |
180 bool gather_continually, | 174 bool gather_continually, |
181 bool prioritize_most_likely_candidate_pairs, | 175 bool prioritize_most_likely_candidate_pairs, |
182 int stable_writable_connection_ping_interval_ms, | 176 int stable_writable_connection_ping_interval_ms) |
183 bool presume_writable_when_fully_relayed) | |
184 : receiving_timeout(receiving_timeout_ms), | 177 : receiving_timeout(receiving_timeout_ms), |
185 backup_connection_ping_interval(backup_connection_ping_interval), | 178 backup_connection_ping_interval(backup_connection_ping_interval), |
186 gather_continually(gather_continually), | 179 gather_continually(gather_continually), |
187 prioritize_most_likely_candidate_pairs( | 180 prioritize_most_likely_candidate_pairs( |
188 prioritize_most_likely_candidate_pairs), | 181 prioritize_most_likely_candidate_pairs), |
189 stable_writable_connection_ping_interval( | 182 stable_writable_connection_ping_interval( |
190 stable_writable_connection_ping_interval_ms), | 183 stable_writable_connection_ping_interval_ms) {} |
191 presume_writable_when_fully_relayed( | |
192 presume_writable_when_fully_relayed) {} | |
193 }; | 184 }; |
194 | 185 |
195 bool BadTransportDescription(const std::string& desc, std::string* err_desc); | 186 bool BadTransportDescription(const std::string& desc, std::string* err_desc); |
196 | 187 |
197 bool IceCredentialsChanged(const std::string& old_ufrag, | 188 bool IceCredentialsChanged(const std::string& old_ufrag, |
198 const std::string& old_pwd, | 189 const std::string& old_pwd, |
199 const std::string& new_ufrag, | 190 const std::string& new_ufrag, |
200 const std::string& new_pwd); | 191 const std::string& new_pwd); |
201 | 192 |
202 class Transport : public sigslot::has_slots<> { | 193 class Transport : public sigslot::has_slots<> { |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 | 367 |
377 ChannelMap channels_; | 368 ChannelMap channels_; |
378 | 369 |
379 RTC_DISALLOW_COPY_AND_ASSIGN(Transport); | 370 RTC_DISALLOW_COPY_AND_ASSIGN(Transport); |
380 }; | 371 }; |
381 | 372 |
382 | 373 |
383 } // namespace cricket | 374 } // namespace cricket |
384 | 375 |
385 #endif // WEBRTC_P2P_BASE_TRANSPORT_H_ | 376 #endif // WEBRTC_P2P_BASE_TRANSPORT_H_ |
OLD | NEW |