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

Unified Diff: webrtc/base/win32socketserver.cc

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/win32socketserver.h ('k') | webrtc/examples/peerconnection/client/peer_connection_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/win32socketserver.cc
diff --git a/webrtc/base/win32socketserver.cc b/webrtc/base/win32socketserver.cc
index 5423eed9bf08561263588a8f6c9c707b51724d08..ab25312df0e7925c3418471f716be8dc15b5a529 100644
--- a/webrtc/base/win32socketserver.cc
+++ b/webrtc/base/win32socketserver.cc
@@ -438,7 +438,10 @@ int Win32Socket::SendTo(const void* buffer, size_t length,
return sent;
}
-int Win32Socket::Recv(void* buffer, size_t length) {
+int Win32Socket::Recv(void* buffer, size_t length, int64_t* timestamp) {
+ if (timestamp) {
+ *timestamp = -1;
+ }
int received = ::recv(socket_, static_cast<char*>(buffer),
static_cast<int>(length), 0);
UpdateLastError();
@@ -447,8 +450,13 @@ int Win32Socket::Recv(void* buffer, size_t length) {
return received;
}
-int Win32Socket::RecvFrom(void* buffer, size_t length,
- SocketAddress* out_addr) {
+int Win32Socket::RecvFrom(void* buffer,
+ size_t length,
+ SocketAddress* out_addr,
+ int64_t* timestamp) {
+ if (timestamp) {
+ *timestamp = -1;
+ }
sockaddr_storage saddr;
socklen_t addr_len = sizeof(saddr);
int received = ::recvfrom(socket_, static_cast<char*>(buffer),
« no previous file with comments | « webrtc/base/win32socketserver.h ('k') | webrtc/examples/peerconnection/client/peer_connection_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698