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

Unified Diff: blimp/net/packet_reader.h

Issue 1452823011: Make PacketReader/PacketWriter interfaces async-only. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | blimp/net/packet_writer.h » ('j') | blimp/net/packet_writer.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/net/packet_reader.h
diff --git a/blimp/net/packet_reader.h b/blimp/net/packet_reader.h
index 3c6abf8aad5aa0d862a585a2470a046b6cfd62de..708c6d84254908396e5dec58ef83ed1ae99edbac 100644
--- a/blimp/net/packet_reader.h
+++ b/blimp/net/packet_reader.h
@@ -18,13 +18,10 @@ class BLIMP_NET_EXPORT PacketReader {
virtual ~PacketReader() {}
// Reads a packet from the connection.
- // Returns the size of the packet, in bytes, if the read operation executed
- // successfully.
- // Returns ERR_IO_PENDING if the operation will be executed asynchronously.
- // |cb| is later invoked with the packet size or an error code.
- // All other return values indicate errors.
- virtual int ReadPacket(const scoped_refptr<net::GrowableIOBuffer>& buf,
- const net::CompletionCallback& cb) = 0;
+ // Invokes |cb| with the size of the packet, in bytes, if the read operation
+ // executed successfully. All other values indicate errors.
Wez 2015/11/20 23:42:13 nit: Could we have it invoke w/ net::OK on success
Kevin M 2015/11/24 21:34:36 Yes, we can advance |offset| to the end.
+ virtual void ReadPacket(const scoped_refptr<net::GrowableIOBuffer>& buf,
+ const net::CompletionCallback& cb) = 0;
};
} // namespace blimp
« no previous file with comments | « no previous file | blimp/net/packet_writer.h » ('j') | blimp/net/packet_writer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698