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

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

Issue 2099563004: Start ICE connectivity checks as soon as the first pair is pingable. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Updating unit test failures. We ping too fast for our own good. Created 4 years, 6 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
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // From TransportChannelImpl: 86 // From TransportChannelImpl:
87 TransportChannelState GetState() const override; 87 TransportChannelState GetState() const override;
88 void SetIceRole(IceRole role) override; 88 void SetIceRole(IceRole role) override;
89 IceRole GetIceRole() const override { return ice_role_; } 89 IceRole GetIceRole() const override { return ice_role_; }
90 void SetIceTiebreaker(uint64_t tiebreaker) override; 90 void SetIceTiebreaker(uint64_t tiebreaker) override;
91 void SetIceCredentials(const std::string& ice_ufrag, 91 void SetIceCredentials(const std::string& ice_ufrag,
92 const std::string& ice_pwd) override; 92 const std::string& ice_pwd) override;
93 void SetRemoteIceCredentials(const std::string& ice_ufrag, 93 void SetRemoteIceCredentials(const std::string& ice_ufrag,
94 const std::string& ice_pwd) override; 94 const std::string& ice_pwd) override;
95 void SetRemoteIceMode(IceMode mode) override; 95 void SetRemoteIceMode(IceMode mode) override;
96 void Connect() override;
97 void MaybeStartGathering() override; 96 void MaybeStartGathering() override;
98 IceGatheringState gathering_state() const override { 97 IceGatheringState gathering_state() const override {
99 return gathering_state_; 98 return gathering_state_;
100 } 99 }
101 void AddRemoteCandidate(const Candidate& candidate) override; 100 void AddRemoteCandidate(const Candidate& candidate) override;
102 void RemoveRemoteCandidate(const Candidate& candidate) override; 101 void RemoveRemoteCandidate(const Candidate& candidate) override;
103 // Sets the parameters in IceConfig. We do not set them blindly. Instead, we 102 // Sets the parameters in IceConfig. We do not set them blindly. Instead, we
104 // only update the parameter if it is considered set in |config|. For example, 103 // only update the parameter if it is considered set in |config|. For example,
105 // a negative value of receiving_timeout will be considered "not set" and we 104 // a negative value of receiving_timeout will be considered "not set" and we
106 // will not use it to update the respective parameter in |config_|. 105 // will not use it to update the respective parameter in |config_|.
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 IceRole ice_role_; 358 IceRole ice_role_;
360 uint64_t tiebreaker_; 359 uint64_t tiebreaker_;
361 IceGatheringState gathering_state_; 360 IceGatheringState gathering_state_;
362 361
363 int check_receiving_interval_; 362 int check_receiving_interval_;
364 int64_t last_ping_sent_ms_ = 0; 363 int64_t last_ping_sent_ms_ = 0;
365 int weak_ping_interval_ = WEAK_PING_INTERVAL; 364 int weak_ping_interval_ = WEAK_PING_INTERVAL;
366 TransportChannelState state_ = TransportChannelState::STATE_INIT; 365 TransportChannelState state_ = TransportChannelState::STATE_INIT;
367 IceConfig config_; 366 IceConfig config_;
368 int last_sent_packet_id_ = -1; // -1 indicates no packet was sent before. 367 int last_sent_packet_id_ = -1; // -1 indicates no packet was sent before.
368 bool started_pinging_ = false;
369 369
370 RTC_DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel); 370 RTC_DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel);
371 }; 371 };
372 372
373 } // namespace cricket 373 } // namespace cricket
374 374
375 #endif // WEBRTC_P2P_BASE_P2PTRANSPORTCHANNEL_H_ 375 #endif // WEBRTC_P2P_BASE_P2PTRANSPORTCHANNEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698