Read recv timestamps from socket (posix only).
This helps a lot on Android devices where the user threads can be scheduled with low priority when the app is in the background, causing spurious significantly delayed before a packet can be read from the socket. With this patch the timestamp is taken by the kernel when the packet actually arrives. R=juberti@chromium.org TBR=juberti@webrtc.org BUG=webrtc:5773 Review URL: https://codereview.webrtc.org/1944683002 . Cr-Commit-Position: refs/heads/master@{#12850}
This commit is contained in:
@ -359,7 +359,7 @@ private:
|
||||
}
|
||||
void OnReadEvent(AsyncSocket* socket) {
|
||||
char data[64 * 1024];
|
||||
int result = socket_->Recv(data, arraysize(data));
|
||||
int result = socket_->Recv(data, arraysize(data), nullptr);
|
||||
if (result > 0) {
|
||||
recv_buffer_.insert(recv_buffer_.end(), data, data + result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user