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

Unified Diff: webrtc/base/testclient.h

Issue 2284903002: Adding ability to simulate EWOULDBLOCK/SignalReadyToSend. (Closed)
Patch Set: Removing commented-out assert Created 4 years, 4 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/base/testclient.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/testclient.h
diff --git a/webrtc/base/testclient.h b/webrtc/base/testclient.h
index 6c0cfbecaf0213a8a45f1844a3c510df450c7882..74ef8cc3762c139a39177a028212121d07f98cc7 100644
--- a/webrtc/base/testclient.h
+++ b/webrtc/base/testclient.h
@@ -77,7 +77,10 @@ class TestClient : public sigslot::has_slots<> {
int GetError();
int SetOption(Socket::Option opt, int value);
- bool ready_to_send() const;
+ bool ready_to_send() const { return ready_to_send_count() > 0; }
+
+ // How many times SignalReadyToSend has been fired.
+ int ready_to_send_count() const { return ready_to_send_count_; }
private:
// Timeout for reads when no packet is expected.
@@ -94,7 +97,7 @@ class TestClient : public sigslot::has_slots<> {
CriticalSection crit_;
AsyncPacketSocket* socket_;
std::vector<Packet*>* packets_;
- bool ready_to_send_;
+ int ready_to_send_count_ = 0;
int64_t prev_packet_timestamp_;
RTC_DISALLOW_COPY_AND_ASSIGN(TestClient);
};
« no previous file with comments | « no previous file | webrtc/base/testclient.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698