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

Unified Diff: remoting/protocol/message_decoder.h

Issue 6271004: Changed MessageReader so that it doesn't read from the socket if there are (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ref-counted MessageReader Created 9 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
« no previous file with comments | « remoting/protocol/input_sender.cc ('k') | remoting/protocol/message_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/message_decoder.h
diff --git a/remoting/protocol/message_decoder.h b/remoting/protocol/message_decoder.h
index 3e0745f73f9a70a4d017f7797c65d5d7be248601..0ba8b7822978eeb5e063ebd60de354699454b034 100644
--- a/remoting/protocol/message_decoder.h
+++ b/remoting/protocol/message_decoder.h
@@ -35,10 +35,11 @@ class MessageDecoder {
// its bytes are consumed.
void AddData(scoped_refptr<net::IOBuffer> data, int data_size);
- // Get next message from the stream and puts it in
- // |message_buffer|. Returns false if there are no complete messages
- // yet.
- bool GetNextMessage(CompoundBuffer* message_buffer);
+ // Returns next message from the stream. Ownership of the result is
+ // passed to the caller. Returns NULL if there are no complete
+ // messages yet, otherwise returns a buffer that contains one
+ // message.
+ CompoundBuffer* GetNextMessage();
private:
// Retrieves the read payload size of the current protocol buffer via |size|.
« no previous file with comments | « remoting/protocol/input_sender.cc ('k') | remoting/protocol/message_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698