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

Unified Diff: net/tools/quic/quic_client.h

Issue 139103002: Break out of the loop in QuicSession::OnCanWrite if the QuicConnection (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/quic/quic_session_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 a1381a5854b2a3d8836d234e95a5570613806e5c..0b8efe8990d0987b8948014b944c5c02400af6dd 100644
--- a/net/tools/quic/quic_client.h
+++ b/net/tools/quic/quic_client.h
@@ -37,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,
@@ -153,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();
@@ -193,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/quic/quic_session_test.cc ('k') | net/tools/quic/quic_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698