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

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

Issue 2163403002: Prepare for ICE-renomination (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Updated comments Created 4 years, 4 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/stun.h ('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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 // Information about all the channels of a transport. 155 // Information about all the channels of a transport.
156 // TODO(hta): Consider if a simple vector is as good as a map. 156 // TODO(hta): Consider if a simple vector is as good as a map.
157 typedef std::vector<TransportChannelStats> TransportChannelStatsList; 157 typedef std::vector<TransportChannelStats> TransportChannelStatsList;
158 158
159 // Information about the stats of a transport. 159 // Information about the stats of a transport.
160 struct TransportStats { 160 struct TransportStats {
161 std::string transport_name; 161 std::string transport_name;
162 TransportChannelStatsList channel_stats; 162 TransportChannelStatsList channel_stats;
163 }; 163 };
164 164
165 // ICE Nomination mode.
166 enum class NominationMode {
167 REGULAR, // Nominate once per ICE restart (Not implemented yet).
168 AGGRESSIVE, // Nominate every connection except that it will behave as if
169 // REGULAR when the remote is an ICE-LITE endpoint.
170 SEMI_AGGRESSIVE // Our current implementation of the nomination algorithm.
171 // The details are described in P2PTransportChannel.
172 };
173
165 // Information about ICE configuration. 174 // Information about ICE configuration.
166 // TODO(deadbeef): Use rtc::Optional to represent unset values, instead of 175 // TODO(deadbeef): Use rtc::Optional to represent unset values, instead of
167 // -1. 176 // -1.
168 struct IceConfig { 177 struct IceConfig {
169 // The ICE connection receiving timeout value in milliseconds. 178 // The ICE connection receiving timeout value in milliseconds.
170 int receiving_timeout = -1; 179 int receiving_timeout = -1;
171 // Time interval in milliseconds to ping a backup connection when the ICE 180 // Time interval in milliseconds to ping a backup connection when the ICE
172 // channel is strongly connected. 181 // channel is strongly connected.
173 int backup_connection_ping_interval = -1; 182 int backup_connection_ping_interval = -1;
174 183
(...skipping 17 matching lines...) Expand all
192 201
193 // Interval to check on all networks and to perform ICE regathering on any 202 // Interval to check on all networks and to perform ICE regathering on any
194 // active network having no connection on it. 203 // active network having no connection on it.
195 rtc::Optional<int> regather_on_failed_networks_interval; 204 rtc::Optional<int> regather_on_failed_networks_interval;
196 205
197 // The time period in which we will not switch the selected connection 206 // 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 207 // when a new connection becomes receiving but the selected connection is not
199 // in case that the selected connection may become receiving soon. 208 // in case that the selected connection may become receiving soon.
200 rtc::Optional<int> receiving_switching_delay; 209 rtc::Optional<int> receiving_switching_delay;
201 210
211 // TODO(honghaiz): Change the default to regular nomination.
212 // Default nomination mode if the remote does not support renomination.
213 NominationMode default_nomination_mode = NominationMode::SEMI_AGGRESSIVE;
214
202 IceConfig() {} 215 IceConfig() {}
203 IceConfig(int receiving_timeout_ms, 216 IceConfig(int receiving_timeout_ms,
204 int backup_connection_ping_interval, 217 int backup_connection_ping_interval,
205 ContinualGatheringPolicy gathering_policy, 218 ContinualGatheringPolicy gathering_policy,
206 bool prioritize_most_likely_candidate_pairs, 219 bool prioritize_most_likely_candidate_pairs,
207 int stable_writable_connection_ping_interval_ms, 220 int stable_writable_connection_ping_interval_ms,
208 bool presume_writable_when_fully_relayed, 221 bool presume_writable_when_fully_relayed,
209 int regather_on_failed_networks_interval_ms, 222 int regather_on_failed_networks_interval_ms,
210 int receiving_switching_delay_ms) 223 int receiving_switching_delay_ms)
211 : receiving_timeout(receiving_timeout_ms), 224 : receiving_timeout(receiving_timeout_ms),
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 414
402 ChannelMap channels_; 415 ChannelMap channels_;
403 416
404 RTC_DISALLOW_COPY_AND_ASSIGN(Transport); 417 RTC_DISALLOW_COPY_AND_ASSIGN(Transport);
405 }; 418 };
406 419
407 420
408 } // namespace cricket 421 } // namespace cricket
409 422
410 #endif // WEBRTC_P2P_BASE_TRANSPORT_H_ 423 #endif // WEBRTC_P2P_BASE_TRANSPORT_H_
OLDNEW
« no previous file with comments | « webrtc/p2p/base/stun.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698