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

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

Issue 1207563002: Add flakiness check if there is no received packets in a certain period. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: First-cut Created 5 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
Index: webrtc/p2p/base/transportchannel.h
diff --git a/webrtc/p2p/base/transportchannel.h b/webrtc/p2p/base/transportchannel.h
index 7d0d1f45b2f89c8341694e6e4659b2b5d824a957..1dd19a21e7052364d3769993028e083b372f416a 100644
--- a/webrtc/p2p/base/transportchannel.h
+++ b/webrtc/p2p/base/transportchannel.h
@@ -72,6 +72,9 @@ class TransportChannel : public sigslot::has_slots<> {
// Emitted when the TransportChannel's ability to send has changed.
sigslot::signal1<TransportChannel*> SignalReadyToSend;
+ bool flaky() const { return flaky_; }
+ sigslot::signal1<TransportChannel*> SignalFlakyState;
+
// Attempts to send the given packet. The return value is < 0 on failure.
// TODO: Remove the default argument once channel code is updated.
virtual int SendPacket(const char* data, size_t len,
@@ -142,6 +145,9 @@ class TransportChannel : public sigslot::has_slots<> {
// Sets the writable state, signaling if necessary.
void set_writable(bool writable);
+ // Sets the flaky state, signaling if necessary.
+ void set_flaky(bool flaky);
+
private:
// Used mostly for debugging.
@@ -149,6 +155,7 @@ class TransportChannel : public sigslot::has_slots<> {
int component_;
bool readable_;
bool writable_;
+ bool flaky_;
pthatcher1 2015/06/24 23:42:52 I'm not completely sure we want to have flaky_ be
DISALLOW_COPY_AND_ASSIGN(TransportChannel);
};

Powered by Google App Engine
This is Rietveld 408576698