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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 // Time interval in milliseconds to ping a backup connection when the ICE | 147 // Time interval in milliseconds to ping a backup connection when the ICE |
148 // channel is strongly connected. | 148 // channel is strongly connected. |
149 int backup_connection_ping_interval = -1; | 149 int backup_connection_ping_interval = -1; |
150 // If true, the most recent port allocator session will keep on running. | 150 // If true, the most recent port allocator session will keep on running. |
151 bool gather_continually = false; | 151 bool gather_continually = false; |
152 | 152 |
153 // Whether we should prioritize Relay/Relay candidate when nothing | 153 // Whether we should prioritize Relay/Relay candidate when nothing |
154 // is writable yet. | 154 // is writable yet. |
155 bool prioritize_most_likely_candidate_pairs = false; | 155 bool prioritize_most_likely_candidate_pairs = false; |
156 | 156 |
157 // Writable connections are pinged at a slower rate. | 157 // If the current best connection is both writable and receiving, |
158 int writable_connection_ping_interval = -1; | 158 // then we will also try hard to make sure it is pinged at this rate |
| 159 // (Default value is a little less than 2 * STRONG_PING_INTERVAL). |
| 160 int max_strong_interval = -1; |
159 | 161 |
160 IceConfig() {} | 162 IceConfig() {} |
161 IceConfig(int receiving_timeout_ms, | 163 IceConfig(int receiving_timeout_ms, |
162 int backup_connection_ping_interval, | 164 int backup_connection_ping_interval, |
163 bool gather_continually, | 165 bool gather_continually, |
164 bool prioritize_most_likely_candidate_pairs, | 166 bool prioritize_most_likely_candidate_pairs, |
165 int writable_connection_ping_interval_ms) | 167 int max_strong_interval_ms) |
166 : receiving_timeout(receiving_timeout_ms), | 168 : receiving_timeout(receiving_timeout_ms), |
167 backup_connection_ping_interval(backup_connection_ping_interval), | 169 backup_connection_ping_interval(backup_connection_ping_interval), |
168 gather_continually(gather_continually), | 170 gather_continually(gather_continually), |
169 prioritize_most_likely_candidate_pairs( | 171 prioritize_most_likely_candidate_pairs( |
170 prioritize_most_likely_candidate_pairs), | 172 prioritize_most_likely_candidate_pairs), |
171 writable_connection_ping_interval( | 173 max_strong_interval(max_strong_interval_ms) {} |
172 writable_connection_ping_interval_ms) {} | |
173 }; | 174 }; |
174 | 175 |
175 bool BadTransportDescription(const std::string& desc, std::string* err_desc); | 176 bool BadTransportDescription(const std::string& desc, std::string* err_desc); |
176 | 177 |
177 bool IceCredentialsChanged(const std::string& old_ufrag, | 178 bool IceCredentialsChanged(const std::string& old_ufrag, |
178 const std::string& old_pwd, | 179 const std::string& old_pwd, |
179 const std::string& new_ufrag, | 180 const std::string& new_ufrag, |
180 const std::string& new_pwd); | 181 const std::string& new_pwd); |
181 | 182 |
182 class Transport : public sigslot::has_slots<> { | 183 class Transport : public sigslot::has_slots<> { |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 | 357 |
357 ChannelMap channels_; | 358 ChannelMap channels_; |
358 | 359 |
359 RTC_DISALLOW_COPY_AND_ASSIGN(Transport); | 360 RTC_DISALLOW_COPY_AND_ASSIGN(Transport); |
360 }; | 361 }; |
361 | 362 |
362 | 363 |
363 } // namespace cricket | 364 } // namespace cricket |
364 | 365 |
365 #endif // WEBRTC_P2P_BASE_TRANSPORT_H_ | 366 #endif // WEBRTC_P2P_BASE_TRANSPORT_H_ |
OLD | NEW |