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

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: proper handling of empty messages 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
Index: remoting/protocol/message_decoder.h
diff --git a/remoting/protocol/message_decoder.h b/remoting/protocol/message_decoder.h
index 3e0745f73f9a70a4d017f7797c65d5d7be248601..00873bb71f39f3e1dd4c5b3391edaf767a7ccb23 100644
--- a/remoting/protocol/message_decoder.h
+++ b/remoting/protocol/message_decoder.h
@@ -35,10 +35,10 @@ 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. Onnership of the result is
+ // passed to the caller. Returns NULL if there are no complete
+ // messages yet.
awong 2011/01/20 20:06:38 Should we note somoewhere that each CompoundBuffer
Alpha Left Google 2011/01/20 20:54:52 I don't think there's a simple DCHECK who can do t
Sergey Ulanov 2011/01/20 21:55:57 Extended the comment a bit.
+ CompoundBuffer* GetNextMessage();
private:
// Retrieves the read payload size of the current protocol buffer via |size|.

Powered by Google App Engine
This is Rietveld 408576698