Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Side by Side Diff: webrtc/p2p/base/transport.h

Issue 2143653005: Dampening connection switch. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: . Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/p2p/base/port.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 int stable_writable_connection_ping_interval = -1; 187 int stable_writable_connection_ping_interval = -1;
188 188
189 // If set to true, this means the ICE transport should presume TURN-to-TURN 189 // If set to true, this means the ICE transport should presume TURN-to-TURN
190 // candidate pairs will succeed, even before a binding response is received. 190 // candidate pairs will succeed, even before a binding response is received.
191 bool presume_writable_when_fully_relayed = false; 191 bool presume_writable_when_fully_relayed = false;
192 192
193 // Interval to check on all networks and to perform ICE regathering on any 193 // Interval to check on all networks and to perform ICE regathering on any
194 // active network having no connection on it. 194 // active network having no connection on it.
195 rtc::Optional<int> regather_on_failed_networks_interval; 195 rtc::Optional<int> regather_on_failed_networks_interval;
196 196
197 // The time period in which we will not switch the selected connection
198 // when a new connection becomes receiving but the selected connection is not
199 // in case that the selected connection may become receiving soon.
200 rtc::Optional<int> receiving_switching_delay;
201
197 IceConfig() {} 202 IceConfig() {}
198 IceConfig(int receiving_timeout_ms, 203 IceConfig(int receiving_timeout_ms,
199 int backup_connection_ping_interval, 204 int backup_connection_ping_interval,
200 ContinualGatheringPolicy gathering_policy, 205 ContinualGatheringPolicy gathering_policy,
201 bool prioritize_most_likely_candidate_pairs, 206 bool prioritize_most_likely_candidate_pairs,
202 int stable_writable_connection_ping_interval_ms, 207 int stable_writable_connection_ping_interval_ms,
203 bool presume_writable_when_fully_relayed, 208 bool presume_writable_when_fully_relayed,
204 int regather_on_failed_networks_interval_ms) 209 int regather_on_failed_networks_interval_ms,
210 int receiving_switching_delay_ms)
205 : receiving_timeout(receiving_timeout_ms), 211 : receiving_timeout(receiving_timeout_ms),
206 backup_connection_ping_interval(backup_connection_ping_interval), 212 backup_connection_ping_interval(backup_connection_ping_interval),
207 continual_gathering_policy(gathering_policy), 213 continual_gathering_policy(gathering_policy),
208 prioritize_most_likely_candidate_pairs( 214 prioritize_most_likely_candidate_pairs(
209 prioritize_most_likely_candidate_pairs), 215 prioritize_most_likely_candidate_pairs),
210 stable_writable_connection_ping_interval( 216 stable_writable_connection_ping_interval(
211 stable_writable_connection_ping_interval_ms), 217 stable_writable_connection_ping_interval_ms),
212 presume_writable_when_fully_relayed( 218 presume_writable_when_fully_relayed(
213 presume_writable_when_fully_relayed), 219 presume_writable_when_fully_relayed),
214 regather_on_failed_networks_interval( 220 regather_on_failed_networks_interval(
215 regather_on_failed_networks_interval_ms) {} 221 regather_on_failed_networks_interval_ms),
222 receiving_switching_delay(receiving_switching_delay_ms) {}
216 }; 223 };
217 224
218 bool BadTransportDescription(const std::string& desc, std::string* err_desc); 225 bool BadTransportDescription(const std::string& desc, std::string* err_desc);
219 226
220 bool IceCredentialsChanged(const std::string& old_ufrag, 227 bool IceCredentialsChanged(const std::string& old_ufrag,
221 const std::string& old_pwd, 228 const std::string& old_pwd,
222 const std::string& new_ufrag, 229 const std::string& new_ufrag,
223 const std::string& new_pwd); 230 const std::string& new_pwd);
224 231
225 class Transport : public sigslot::has_slots<> { 232 class Transport : public sigslot::has_slots<> {
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 399
393 ChannelMap channels_; 400 ChannelMap channels_;
394 401
395 RTC_DISALLOW_COPY_AND_ASSIGN(Transport); 402 RTC_DISALLOW_COPY_AND_ASSIGN(Transport);
396 }; 403 };
397 404
398 405
399 } // namespace cricket 406 } // namespace cricket
400 407
401 #endif // WEBRTC_P2P_BASE_TRANSPORT_H_ 408 #endif // WEBRTC_P2P_BASE_TRANSPORT_H_
OLDNEW
« no previous file with comments | « webrtc/p2p/base/port.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698