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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 // Information about ICE configuration. | 140 // Information about ICE configuration. |
141 struct IceConfig { | 141 struct IceConfig { |
142 // The ICE connection receiving timeout value. | 142 // The ICE connection receiving timeout value. |
143 // TODO(honghaiz): Remove suffix _ms to be consistent. | 143 // TODO(honghaiz): Remove suffix _ms to be consistent. |
144 int receiving_timeout_ms = -1; | 144 int receiving_timeout_ms = -1; |
145 // Time interval in milliseconds to ping a backup connection when the ICE | 145 // Time interval in milliseconds to ping a backup connection when the ICE |
146 // channel is strongly connected. | 146 // channel is strongly connected. |
147 int backup_connection_ping_interval = -1; | 147 int backup_connection_ping_interval = -1; |
148 // If true, the most recent port allocator session will keep on running. | 148 // If true, the most recent port allocator session will keep on running. |
149 bool gather_continually = false; | 149 bool gather_continually = false; |
| 150 |
| 151 // Whether we should prioritize Relay/Relay candidate when nothing |
| 152 // is writable yet. |
| 153 bool prioritize_most_likely_candidate_pairs = false; |
| 154 |
| 155 // If the current best connection is both writable and receiving, |
| 156 // then we will also try hard to make sure it is pinged at this rate |
| 157 // (Default value is a little less than 2 * STRONG_PING_DELAY). |
| 158 int max_strong_delay = -1; |
| 159 |
| 160 IceConfig() {} |
| 161 IceConfig(int receiving_timeout, |
| 162 int backup_connection_ping_interval, |
| 163 bool gather_continually, |
| 164 bool prioritize_most_likely_candidate_pairs, |
| 165 int max_strong_delay) |
| 166 : receiving_timeout_ms(receiving_timeout), |
| 167 backup_connection_ping_interval(backup_connection_ping_interval), |
| 168 gather_continually(gather_continually), |
| 169 prioritize_most_likely_candidate_pairs( |
| 170 prioritize_most_likely_candidate_pairs), |
| 171 max_strong_delay(max_strong_delay) {} |
150 }; | 172 }; |
151 | 173 |
152 bool BadTransportDescription(const std::string& desc, std::string* err_desc); | 174 bool BadTransportDescription(const std::string& desc, std::string* err_desc); |
153 | 175 |
154 bool IceCredentialsChanged(const std::string& old_ufrag, | 176 bool IceCredentialsChanged(const std::string& old_ufrag, |
155 const std::string& old_pwd, | 177 const std::string& old_pwd, |
156 const std::string& new_ufrag, | 178 const std::string& new_ufrag, |
157 const std::string& new_pwd); | 179 const std::string& new_pwd); |
158 | 180 |
159 class Transport : public sigslot::has_slots<> { | 181 class Transport : public sigslot::has_slots<> { |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 | 339 |
318 ChannelMap channels_; | 340 ChannelMap channels_; |
319 | 341 |
320 RTC_DISALLOW_COPY_AND_ASSIGN(Transport); | 342 RTC_DISALLOW_COPY_AND_ASSIGN(Transport); |
321 }; | 343 }; |
322 | 344 |
323 | 345 |
324 } // namespace cricket | 346 } // namespace cricket |
325 | 347 |
326 #endif // WEBRTC_P2P_BASE_TRANSPORT_H_ | 348 #endif // WEBRTC_P2P_BASE_TRANSPORT_H_ |
OLD | NEW |