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

Unified Diff: webrtc/p2p/base/packettransportinterface.h

Issue 2444793003: Let receiving() and SignalReceivingState be part of rtc::PacketTransportInterface. (Closed)
Patch Set: Fix comment for receiving(). Created 4 years, 1 month 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/p2p/base/dtlstransportchannel.cc ('k') | webrtc/p2p/base/transportchannel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/packettransportinterface.h
diff --git a/webrtc/p2p/base/packettransportinterface.h b/webrtc/p2p/base/packettransportinterface.h
index c796c6c2fa11194a1391e7b0b48ba7b277dafdea..d0665bc1db07d23a66b8684531e68bbd6f9007fd 100644
--- a/webrtc/p2p/base/packettransportinterface.h
+++ b/webrtc/p2p/base/packettransportinterface.h
@@ -36,6 +36,10 @@ class PacketTransportInterface : public sigslot::has_slots<> {
// The transport has been established.
virtual bool writable() const = 0;
+ // The transport has received a packet in the last X milliseconds, here X is
+ // configured by each implementation.
+ virtual bool receiving() const = 0;
+
// Attempts to send the given packet.
// The return value is < 0 on failure. The return value in failure case is not
// descriptive. Depending on failure cause and implementation details
@@ -70,6 +74,9 @@ class PacketTransportInterface : public sigslot::has_slots<> {
// SendPacket's return code and/or GetError.
sigslot::signal1<PacketTransportInterface*> SignalReadyToSend;
+ // Emitted when receiving state changes to true.
+ sigslot::signal1<PacketTransportInterface*> SignalReceivingState;
+
// Signalled each time a packet is received on this channel.
sigslot::signal5<PacketTransportInterface*,
const char*,
« no previous file with comments | « webrtc/p2p/base/dtlstransportchannel.cc ('k') | webrtc/p2p/base/transportchannel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698