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

Unified Diff: webrtc/base/testclient.h

Issue 1944683002: Read recv timestamps from socket (posix only). (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 7 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/base/ssladapter_unittest.cc ('k') | 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 df831fefb75e880533a1038812c6512e08bc8ca3..d78e142a2f6c1c7a3f5252ffcd3c83d9a71236f2 100644
--- a/webrtc/base/testclient.h
+++ b/webrtc/base/testclient.h
@@ -24,13 +24,17 @@ class TestClient : public sigslot::has_slots<> {
public:
// Records the contents of a packet that was received.
struct Packet {
- Packet(const SocketAddress& a, const char* b, size_t s);
+ Packet(const SocketAddress& a,
+ const char* b,
+ size_t s,
+ const PacketTime& packet_time);
Packet(const Packet& p);
virtual ~Packet();
SocketAddress addr;
char* buf;
size_t size;
+ PacketTime packet_time;
};
// Default timeout for NextPacket reads.
@@ -85,11 +89,14 @@ class TestClient : public sigslot::has_slots<> {
const SocketAddress& remote_addr,
const PacketTime& packet_time);
void OnReadyToSend(AsyncPacketSocket* socket);
+ bool CheckTimestamp(int64_t packet_timestamp);
CriticalSection crit_;
AsyncPacketSocket* socket_;
std::vector<Packet*>* packets_;
bool ready_to_send_;
+ int64_t prev_packet_timestamp_;
+ int64_t prev_time_us_;
RTC_DISALLOW_COPY_AND_ASSIGN(TestClient);
};
« no previous file with comments | « webrtc/base/ssladapter_unittest.cc ('k') | webrtc/base/testclient.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698