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

Unified Diff: blimp/net/packet_writer.h

Issue 1452823011: Make PacketReader/PacketWriter interfaces async-only. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years 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 | « blimp/net/packet_reader.h ('k') | blimp/net/stream_packet_reader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/net/packet_writer.h
diff --git a/blimp/net/packet_writer.h b/blimp/net/packet_writer.h
index e5dbb9a1d53d1543a02c478aad118f735f466702..8c7b9ca7fb46c324d0c15efeb1bad7dadfda8415 100644
--- a/blimp/net/packet_writer.h
+++ b/blimp/net/packet_writer.h
@@ -21,14 +21,11 @@ class BLIMP_NET_EXPORT PacketWriter {
public:
virtual ~PacketWriter() {}
- // Writes a packet of at least one byte in size to a connection.
- //
- // Returns net::OK or an error code if the operation executed successfully.
- // Returns ERR_IO_PENDING if the operation will be executed asynchronously.
- // |cb| is later invoked with net::OK or an error code.
- // An error code indicates that caller should stop using this writer.
- virtual int WritePacket(scoped_refptr<net::DrainableIOBuffer> data,
- const net::CompletionCallback& callback) = 0;
+ // Invokes |cb| with net::OK if the write operation executed successfully.
+ // All other values indicate unrecoverable errors.
+ // |callback| must not be invoked if |this| is deleted.
+ virtual void WritePacket(scoped_refptr<net::DrainableIOBuffer> data,
+ const net::CompletionCallback& callback) = 0;
};
} // namespace blimp
« no previous file with comments | « blimp/net/packet_reader.h ('k') | blimp/net/stream_packet_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698