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

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

Issue 2025573002: Use continual gathering to restore backup connections (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Merge 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/fakeportallocator.h ('k') | webrtc/p2p/base/p2ptransportchannel.h » ('j') | 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 2009 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2009 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 void SetCandidatesGatheringComplete() { 173 void SetCandidatesGatheringComplete() {
174 if (gathering_state_ != kIceGatheringComplete) { 174 if (gathering_state_ != kIceGatheringComplete) {
175 gathering_state_ = kIceGatheringComplete; 175 gathering_state_ = kIceGatheringComplete;
176 SignalGatheringState(this); 176 SignalGatheringState(this);
177 } 177 }
178 } 178 }
179 179
180 void SetReceiving(bool receiving) { set_receiving(receiving); } 180 void SetReceiving(bool receiving) { set_receiving(receiving); }
181 181
182 void SetIceConfig(const IceConfig& config) override { 182 void SetIceConfig(const IceConfig& config) override { ice_config_ = config; }
183 receiving_timeout_ = config.receiving_timeout;
184 gather_continually_ = config.gather_continually;
185 }
186 183
187 int receiving_timeout() const { return receiving_timeout_; } 184 int receiving_timeout() const { return ice_config_.receiving_timeout; }
188 bool gather_continually() const { return gather_continually_; } 185 bool gather_continually() const { return ice_config_.gather_continually(); }
189 186
190 int SendPacket(const char* data, 187 int SendPacket(const char* data,
191 size_t len, 188 size_t len,
192 const rtc::PacketOptions& options, 189 const rtc::PacketOptions& options,
193 int flags) override { 190 int flags) override {
194 if (state_ != STATE_CONNECTED) { 191 if (state_ != STATE_CONNECTED) {
195 return -1; 192 return -1;
196 } 193 }
197 194
198 if (flags != PF_SRTP_BYPASS && flags != 0) { 195 if (flags != PF_SRTP_BYPASS && flags != 0) {
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 enum State { STATE_INIT, STATE_CONNECTED }; 308 enum State { STATE_INIT, STATE_CONNECTED };
312 FakeTransportChannel* dest_ = nullptr; 309 FakeTransportChannel* dest_ = nullptr;
313 State state_ = STATE_INIT; 310 State state_ = STATE_INIT;
314 bool async_ = false; 311 bool async_ = false;
315 Candidates remote_candidates_; 312 Candidates remote_candidates_;
316 rtc::scoped_refptr<rtc::RTCCertificate> local_cert_; 313 rtc::scoped_refptr<rtc::RTCCertificate> local_cert_;
317 rtc::FakeSSLCertificate* remote_cert_ = nullptr; 314 rtc::FakeSSLCertificate* remote_cert_ = nullptr;
318 bool do_dtls_ = false; 315 bool do_dtls_ = false;
319 std::vector<int> srtp_ciphers_; 316 std::vector<int> srtp_ciphers_;
320 int chosen_crypto_suite_ = rtc::SRTP_INVALID_CRYPTO_SUITE; 317 int chosen_crypto_suite_ = rtc::SRTP_INVALID_CRYPTO_SUITE;
321 int receiving_timeout_ = -1; 318 IceConfig ice_config_;
322 bool gather_continually_ = false;
323 IceRole role_ = ICEROLE_UNKNOWN; 319 IceRole role_ = ICEROLE_UNKNOWN;
324 uint64_t tiebreaker_ = 0; 320 uint64_t tiebreaker_ = 0;
325 std::string ice_ufrag_; 321 std::string ice_ufrag_;
326 std::string ice_pwd_; 322 std::string ice_pwd_;
327 std::string remote_ice_ufrag_; 323 std::string remote_ice_ufrag_;
328 std::string remote_ice_pwd_; 324 std::string remote_ice_pwd_;
329 IceMode remote_ice_mode_ = ICEMODE_FULL; 325 IceMode remote_ice_mode_ = ICEMODE_FULL;
330 rtc::SSLProtocolVersion ssl_max_version_ = rtc::SSL_PROTOCOL_DTLS_12; 326 rtc::SSLProtocolVersion ssl_max_version_ = rtc::SSL_PROTOCOL_DTLS_12;
331 rtc::SSLFingerprint dtls_fingerprint_; 327 rtc::SSLFingerprint dtls_fingerprint_;
332 rtc::SSLRole ssl_role_ = rtc::SSL_CLIENT; 328 rtc::SSLRole ssl_role_ = rtc::SSL_CLIENT;
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 } 572 }
577 } 573 }
578 574
579 private: 575 private:
580 bool fail_create_channel_; 576 bool fail_create_channel_;
581 }; 577 };
582 578
583 } // namespace cricket 579 } // namespace cricket
584 580
585 #endif // WEBRTC_P2P_BASE_FAKETRANSPORTCONTROLLER_H_ 581 #endif // WEBRTC_P2P_BASE_FAKETRANSPORTCONTROLLER_H_
OLDNEW
« no previous file with comments | « webrtc/p2p/base/fakeportallocator.h ('k') | webrtc/p2p/base/p2ptransportchannel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698