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

Unified Diff: remoting/protocol/message_decoder.h

Issue 850983002: Implement video frame acknowledgements in the chromoting protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
Index: remoting/protocol/message_decoder.h
diff --git a/remoting/protocol/message_decoder.h b/remoting/protocol/message_decoder.h
index fc42871ddee5dacc6bc5477509f35b002fc324d5..2bcf9d285363524c027f96ad433208449b932ac2 100644
--- a/remoting/protocol/message_decoder.h
+++ b/remoting/protocol/message_decoder.h
@@ -35,6 +35,10 @@ class MessageDecoder {
MessageDecoder();
virtual ~MessageDecoder();
+ // True if the buffer is empty. If the buffer is empty and GetNextMessage()
+ // returns nullptr it means that the buffer contains incomplete messages.
+ bool is_buffer_empty() { return buffer_.total_bytes() == 0; }
+
// Add next chunk of data. MessageDecoder retains |data| until all
// its bytes are consumed.
void AddData(scoped_refptr<net::IOBuffer> data, int data_size);

Powered by Google App Engine
This is Rietveld 408576698