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

Unified Diff: webrtc/api/datachannel.h

Issue 2413803002: DataChannel[Interface]::[message/bytes]_[sent/received]() added. (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | webrtc/api/datachannel.cc » ('j') | webrtc/api/datachannel_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/datachannel.h
diff --git a/webrtc/api/datachannel.h b/webrtc/api/datachannel.h
index 714e6e397e4448d1899666842116a970a84af122..7d7f6c75df7a4fbe65c37b65b71a86e71e007c4f 100644
--- a/webrtc/api/datachannel.h
+++ b/webrtc/api/datachannel.h
@@ -130,6 +130,10 @@ class DataChannel : public DataChannelInterface,
virtual uint64_t buffered_amount() const;
virtual void Close();
virtual DataState state() const { return state_; }
+ virtual uint32_t messages_sent() const { return messages_sent_; }
+ virtual uint64_t bytes_sent() const { return bytes_sent_; }
+ virtual uint32_t messages_received() const { return messages_received_; }
+ virtual uint64_t bytes_received() const { return bytes_received_; }
virtual bool Send(const DataBuffer& buffer);
// rtc::MessageHandler override.
@@ -245,6 +249,10 @@ class DataChannel : public DataChannelInterface,
InternalDataChannelInit config_;
DataChannelObserver* observer_;
DataState state_;
+ uint32_t messages_sent_;
+ uint64_t bytes_sent_;
+ uint32_t messages_received_;
+ uint64_t bytes_received_;
cricket::DataChannelType data_channel_type_;
DataChannelProviderInterface* provider_;
HandshakeState handshake_state_;
@@ -274,6 +282,10 @@ BEGIN_SIGNALING_PROXY_MAP(DataChannel)
PROXY_CONSTMETHOD0(bool, negotiated)
PROXY_CONSTMETHOD0(int, id)
PROXY_CONSTMETHOD0(DataState, state)
+ PROXY_CONSTMETHOD0(uint32_t, messages_sent)
+ PROXY_CONSTMETHOD0(uint64_t, bytes_sent)
+ PROXY_CONSTMETHOD0(uint32_t, messages_received)
+ PROXY_CONSTMETHOD0(uint64_t, bytes_received)
PROXY_CONSTMETHOD0(uint64_t, buffered_amount)
PROXY_METHOD0(void, Close)
PROXY_METHOD1(bool, Send, const DataBuffer&)
« no previous file with comments | « no previous file | webrtc/api/datachannel.cc » ('j') | webrtc/api/datachannel_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698