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: net/tools/quic/quic_client.h

Issue 131743009: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use size_t instead of int to fix win_x64 compile error Created 6 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 | « net/tools/quic/end_to_end_test.cc ('k') | net/tools/quic/quic_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_client.h
diff --git a/net/tools/quic/quic_client.h b/net/tools/quic/quic_client.h
index 5e03882b29aa11e2a679d90ca1a7c5cc355a8638..0b8efe8990d0987b8948014b944c5c02400af6dd 100644
--- a/net/tools/quic/quic_client.h
+++ b/net/tools/quic/quic_client.h
@@ -10,6 +10,7 @@
#include <string>
+#include "base/basictypes.h"
#include "base/command_line.h"
#include "base/memory/scoped_ptr.h"
#include "net/base/ip_endpoint.h"
@@ -36,6 +37,15 @@ class QuicClientPeer;
class QuicClient : public EpollCallbackInterface,
public QuicDataStream::Visitor {
public:
+ class ResponseListener {
+ public:
+ ResponseListener() {}
+ virtual ~ResponseListener() {}
+ virtual void OnCompleteResponse(QuicStreamId id,
+ const BalsaHeaders& response_headers,
+ const string& response_body) = 0;
+ };
+
QuicClient(IPEndPoint server_address,
const string& server_hostname,
const QuicVersionVector& supported_versions,
@@ -152,6 +162,11 @@ class QuicClient : public EpollCallbackInterface,
supported_versions_ = versions;
}
+ // Takes ownership of the listener.
+ void set_response_listener(ResponseListener* listener) {
+ response_listener_.reset(listener);
+ }
+
protected:
virtual QuicGuid GenerateGuid();
virtual QuicEpollConnectionHelper* CreateQuicConnectionHelper();
@@ -192,6 +207,9 @@ class QuicClient : public EpollCallbackInterface,
// Helper to be used by created connections.
scoped_ptr<QuicEpollConnectionHelper> helper_;
+ // Listens for full responses.
+ scoped_ptr<ResponseListener> response_listener_;
+
// Writer used to actually send packets to the wire.
scoped_ptr<QuicPacketWriter> writer_;
« no previous file with comments | « net/tools/quic/end_to_end_test.cc ('k') | net/tools/quic/quic_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698