Update talk to 58127566 together with
https://webrtc-codereview.appspot.com/5309005/.
R=mallinath@webrtc.org, niklas.enbom@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/5719004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@5277 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/talk/base/asyncpacketsocket.h b/talk/base/asyncpacketsocket.h
index 3b4748f..8ee0a36 100644
--- a/talk/base/asyncpacketsocket.h
+++ b/talk/base/asyncpacketsocket.h
@@ -31,9 +31,30 @@
#include "talk/base/dscp.h"
#include "talk/base/sigslot.h"
#include "talk/base/socket.h"
+#include "talk/base/timeutils.h"
namespace talk_base {
+// This structure will have the information about when packet is actually
+// received by socket.
+struct PacketTime {
+ PacketTime() : timestamp(0), not_before(0) {}
+ PacketTime(int64 timestamp, int64 not_before)
+ : timestamp(timestamp), not_before(not_before) {
+ }
+
+ int64 timestamp; // Receive time after socket delivers the data.
+ int64 not_before; // Earliest possible time the data could have arrived,
+ // indicating the potential error in the |timestamp| value,
+ // in case the system, is busy. For example, the time of
+ // the last select() call.
+ // If unknown, this value will be set to zero.
+};
+
+inline PacketTime CreatePacketTime(int64 not_before) {
+ return PacketTime(TimeMicros(), not_before);
+}
+
// Provides the ability to receive packets asynchronously. Sends are not
// buffered since it is acceptable to drop packets under high load.
class AsyncPacketSocket : public sigslot::has_slots<> {
@@ -78,8 +99,9 @@
// Emitted each time a packet is read. Used only for UDP and
// connected TCP sockets.
- sigslot::signal4<AsyncPacketSocket*, const char*, size_t,
- const SocketAddress&> SignalReadPacket;
+ sigslot::signal5<AsyncPacketSocket*, const char*, size_t,
+ const SocketAddress&,
+ const PacketTime&> SignalReadPacket;
// Emitted when the socket is currently able to send.
sigslot::signal1<AsyncPacketSocket*> SignalReadyToSend;