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 // If the current best connection is both writable and receiving, | 170 // If the current best connection is both writable and receiving, |
169 // then we will also try hard to make sure it is pinged at this rate | 171 // then we will also try hard to make sure it is pinged at this rate |
170 // (Default value is a little less than 2 * STRONG_PING_INTERVAL). | 172 // (Default value is a little less than 2 * STRONG_PING_INTERVAL). |
171 int max_strong_interval = -1; | 173 int max_strong_interval = -1; |
172 | 174 |
175 // If set to false, this means the ICE transport can expect TURN-to-TURN | |
176 // candidate pairs to work even before CreatePermission requests are sent | |
177 // to the TURN servers. This allows media to be sent earlier, without even | |
178 // requiring binding request/responses to verify that the connection works. | |
179 bool fully_relayed_createpermission_needed = true; | |
pthatcher1
2016/06/21 06:20:50
I still think this needs to reflect that we are op
Taylor Brandstetter
2016/06/22 00:37:07
Done.
| |
180 | |
173 IceConfig() {} | 181 IceConfig() {} |
174 IceConfig(int receiving_timeout_ms, | 182 IceConfig(int receiving_timeout_ms, |
175 int backup_connection_ping_interval, | 183 int backup_connection_ping_interval, |
176 bool gather_continually, | 184 bool gather_continually, |
177 bool prioritize_most_likely_candidate_pairs, | 185 bool prioritize_most_likely_candidate_pairs, |
178 int max_strong_interval_ms) | 186 int max_strong_interval_ms, |
187 bool fully_relayed_no_createpermission_needed) | |
179 : receiving_timeout(receiving_timeout_ms), | 188 : receiving_timeout(receiving_timeout_ms), |
180 backup_connection_ping_interval(backup_connection_ping_interval), | 189 backup_connection_ping_interval(backup_connection_ping_interval), |
181 gather_continually(gather_continually), | 190 gather_continually(gather_continually), |
182 prioritize_most_likely_candidate_pairs( | 191 prioritize_most_likely_candidate_pairs( |
183 prioritize_most_likely_candidate_pairs), | 192 prioritize_most_likely_candidate_pairs), |
184 max_strong_interval(max_strong_interval_ms) {} | 193 max_strong_interval(max_strong_interval_ms), |
194 fully_relayed_createpermission_needed( | |
195 fully_relayed_no_createpermission_needed) {} | |
185 }; | 196 }; |
186 | 197 |
187 bool BadTransportDescription(const std::string& desc, std::string* err_desc); | 198 bool BadTransportDescription(const std::string& desc, std::string* err_desc); |
188 | 199 |
189 bool IceCredentialsChanged(const std::string& old_ufrag, | 200 bool IceCredentialsChanged(const std::string& old_ufrag, |
190 const std::string& old_pwd, | 201 const std::string& old_pwd, |
191 const std::string& new_ufrag, | 202 const std::string& new_ufrag, |
192 const std::string& new_pwd); | 203 const std::string& new_pwd); |
193 | 204 |
194 class Transport : public sigslot::has_slots<> { | 205 class Transport : public sigslot::has_slots<> { |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
368 | 379 |
369 ChannelMap channels_; | 380 ChannelMap channels_; |
370 | 381 |
371 RTC_DISALLOW_COPY_AND_ASSIGN(Transport); | 382 RTC_DISALLOW_COPY_AND_ASSIGN(Transport); |
372 }; | 383 }; |
373 | 384 |
374 | 385 |
375 } // namespace cricket | 386 } // namespace cricket |
376 | 387 |
377 #endif // WEBRTC_P2P_BASE_TRANSPORT_H_ | 388 #endif // WEBRTC_P2P_BASE_TRANSPORT_H_ |
OLD | NEW |