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

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

Issue 1311433009: A few updates on connection states (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Dropping changes on pruning and write_stale state. Created 5 years, 3 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 | « no previous file | webrtc/p2p/base/p2ptransportchannel.cc » ('j') | webrtc/p2p/base/p2ptransportchannel.cc » ('J')
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 a8f16666c9625897de4cff8e9f0e11a86c76d13e..92dc3c4a5fc7470557aa411e61e90d4ca47e1343 100644
--- a/webrtc/p2p/base/p2ptransportchannel.h
+++ b/webrtc/p2p/base/p2ptransportchannel.h
@@ -165,6 +165,9 @@ class P2PTransportChannel : public TransportChannelImpl,
return allocator_sessions_.back();
}
+ // A transport channel is weak if the current best connection is either
+ // not receiving or not writable, or if there is no best connection at all.
+ bool Weak() const;
void Allocate();
void UpdateConnectionStates();
void RequestSort();
@@ -215,9 +218,7 @@ class P2PTransportChannel : public TransportChannelImpl,
void OnMessage(rtc::Message *pmsg) override;
void OnSort();
- void OnPing();
-
- void OnCheckReceiving();
+ void OnCheckAndPing();
void PruneConnections();
Connection* best_nominated_connection() const;
@@ -251,6 +252,7 @@ class P2PTransportChannel : public TransportChannelImpl,
int check_receiving_delay_;
int receiving_timeout_;
+ uint32 last_ping_sent_ms_ = 0;
RTC_DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel);
};
« no previous file with comments | « no previous file | webrtc/p2p/base/p2ptransportchannel.cc » ('j') | webrtc/p2p/base/p2ptransportchannel.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698