| 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. |
| 155 struct IceConfig { | 157 struct IceConfig { |
| 156 // The ICE connection receiving timeout value in milliseconds. | 158 // The ICE connection receiving timeout value in milliseconds. |
| 157 int receiving_timeout = -1; | 159 int receiving_timeout = -1; |
| 158 // Time interval in milliseconds to ping a backup connection when the ICE | 160 // Time interval in milliseconds to ping a backup connection when the ICE |
| 159 // channel is strongly connected. | 161 // channel is strongly connected. |
| 160 int backup_connection_ping_interval = -1; | 162 int backup_connection_ping_interval = -1; |
| 161 // If true, the most recent port allocator session will keep on running. | 163 // If true, the most recent port allocator session will keep on running. |
| 162 bool gather_continually = false; | 164 bool gather_continually = false; |
| 163 | 165 |
| 164 // Whether we should prioritize Relay/Relay candidate when nothing | 166 // Whether we should prioritize Relay/Relay candidate when nothing |
| 165 // is writable yet. | 167 // is writable yet. |
| 166 bool prioritize_most_likely_candidate_pairs = false; | 168 bool prioritize_most_likely_candidate_pairs = false; |
| 167 | 169 |
| 168 // Writable connections are pinged at a slower rate once stablized. | 170 // Writable connections are pinged at a slower rate once stablized. |
| 169 int stable_writable_connection_ping_interval = -1; | 171 int stable_writable_connection_ping_interval = -1; |
| 170 | 172 |
| 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 |
| 171 IceConfig() {} | 177 IceConfig() {} |
| 172 IceConfig(int receiving_timeout_ms, | 178 IceConfig(int receiving_timeout_ms, |
| 173 int backup_connection_ping_interval, | 179 int backup_connection_ping_interval, |
| 174 bool gather_continually, | 180 bool gather_continually, |
| 175 bool prioritize_most_likely_candidate_pairs, | 181 bool prioritize_most_likely_candidate_pairs, |
| 176 int stable_writable_connection_ping_interval_ms) | 182 int stable_writable_connection_ping_interval_ms, |
| 183 bool presume_writable_when_fully_relayed) |
| 177 : receiving_timeout(receiving_timeout_ms), | 184 : receiving_timeout(receiving_timeout_ms), |
| 178 backup_connection_ping_interval(backup_connection_ping_interval), | 185 backup_connection_ping_interval(backup_connection_ping_interval), |
| 179 gather_continually(gather_continually), | 186 gather_continually(gather_continually), |
| 180 prioritize_most_likely_candidate_pairs( | 187 prioritize_most_likely_candidate_pairs( |
| 181 prioritize_most_likely_candidate_pairs), | 188 prioritize_most_likely_candidate_pairs), |
| 182 stable_writable_connection_ping_interval( | 189 stable_writable_connection_ping_interval( |
| 183 stable_writable_connection_ping_interval_ms) {} | 190 stable_writable_connection_ping_interval_ms), |
| 191 presume_writable_when_fully_relayed( |
| 192 presume_writable_when_fully_relayed) {} |
| 184 }; | 193 }; |
| 185 | 194 |
| 186 bool BadTransportDescription(const std::string& desc, std::string* err_desc); | 195 bool BadTransportDescription(const std::string& desc, std::string* err_desc); |
| 187 | 196 |
| 188 bool IceCredentialsChanged(const std::string& old_ufrag, | 197 bool IceCredentialsChanged(const std::string& old_ufrag, |
| 189 const std::string& old_pwd, | 198 const std::string& old_pwd, |
| 190 const std::string& new_ufrag, | 199 const std::string& new_ufrag, |
| 191 const std::string& new_pwd); | 200 const std::string& new_pwd); |
| 192 | 201 |
| 193 class Transport : public sigslot::has_slots<> { | 202 class Transport : public sigslot::has_slots<> { |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 | 376 |
| 368 ChannelMap channels_; | 377 ChannelMap channels_; |
| 369 | 378 |
| 370 RTC_DISALLOW_COPY_AND_ASSIGN(Transport); | 379 RTC_DISALLOW_COPY_AND_ASSIGN(Transport); |
| 371 }; | 380 }; |
| 372 | 381 |
| 373 | 382 |
| 374 } // namespace cricket | 383 } // namespace cricket |
| 375 | 384 |
| 376 #endif // WEBRTC_P2P_BASE_TRANSPORT_H_ | 385 #endif // WEBRTC_P2P_BASE_TRANSPORT_H_ |
| OLD | NEW |