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

Unified Diff: webrtc/p2p/base/p2ptransportchannel.h

Issue 2063823008: Adding IceConfig option to assume TURN/TURN candidate pairs will work. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Merge with master again.. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/api/webrtcsession_unittest.cc ('k') | webrtc/p2p/base/p2ptransportchannel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/p2ptransportchannel.h
diff --git a/webrtc/p2p/base/p2ptransportchannel.h b/webrtc/p2p/base/p2ptransportchannel.h
index 3f0191e83d520ae367ddeefc6ee10ad76585e6c4..d28f60b2e0bd97c11fbd33e747afc19f475dd62a 100644
--- a/webrtc/p2p/base/p2ptransportchannel.h
+++ b/webrtc/p2p/base/p2ptransportchannel.h
@@ -104,6 +104,7 @@ class P2PTransportChannel : public TransportChannelImpl,
// only update the parameter if it is considered set in |config|. For example,
// a negative value of receiving_timeout will be considered "not set" and we
// will not use it to update the respective parameter in |config_|.
+ // TODO(deadbeef): Use rtc::Optional instead of negative values.
void SetIceConfig(const IceConfig& config) override;
const IceConfig& config() const;
@@ -209,6 +210,20 @@ class P2PTransportChannel : public TransportChannelImpl,
bool weak() const;
void UpdateConnectionStates();
void RequestSort();
+
+ // The methods below return a positive value if a is preferable to b,
+ // a negative value if b is preferable, and 0 if they're equally preferable.
+ int CompareConnectionStates(const cricket::Connection* a,
+ const cricket::Connection* b) const;
+ int CompareConnectionCandidates(const cricket::Connection* a,
+ const cricket::Connection* b) const;
+ // Compares first on states, then on candidates, then on RTT.
+ int CompareConnections(const cricket::Connection* a,
+ const cricket::Connection* b) const;
+ bool PresumedWritable(const cricket::Connection* conn) const;
+
+ bool ShouldSwitchSelectedConnection(const cricket::Connection* selected,
+ const cricket::Connection* conn) const;
void SortConnections();
void SwitchBestConnectionTo(Connection* conn);
void UpdateState();
« no previous file with comments | « webrtc/api/webrtcsession_unittest.cc ('k') | webrtc/p2p/base/p2ptransportchannel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698