diff options
author | rch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-07 22:39:49 +0000 |
---|---|---|
committer | rch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-07 22:39:49 +0000 |
commit | a018d5e5c4610ea0762faa1051c28b2c939f4e30 (patch) | |
tree | 1571dab1fce9c3cfd83cc0194d0685cbd1a9bff1 /net/tools/quic/quic_client.h | |
parent | a46d67d9abe72bc908634a5849cfdd2d31654d15 (diff) | |
download | chromium_src-a018d5e5c4610ea0762faa1051c28b2c939f4e30.zip chromium_src-a018d5e5c4610ea0762faa1051c28b2c939f4e30.tar.gz chromium_src-a018d5e5c4610ea0762faa1051c28b2c939f4e30.tar.bz2 |
Add better help information to quic_client and quic_server.
Also, modify the quic_client to print out the response contents.
Merge internal change: 53403247
Review URL: https://codereview.chromium.org/25043005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227365 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/tools/quic/quic_client.h')
-rw-r--r-- | net/tools/quic/quic_client.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/net/tools/quic/quic_client.h b/net/tools/quic/quic_client.h index 8146764..8826815 100644 --- a/net/tools/quic/quic_client.h +++ b/net/tools/quic/quic_client.h @@ -34,10 +34,13 @@ namespace test { class QuicClientPeer; } // namespace test -class QuicClient : public EpollCallbackInterface { +class QuicClient : public EpollCallbackInterface, + public ReliableQuicStream::Visitor { public: - QuicClient(IPEndPoint server_address, const std::string& server_hostname, - const QuicVersion version); + QuicClient(IPEndPoint server_address, + const string& server_hostname, + const QuicVersion version, + bool print_response); QuicClient(IPEndPoint server_address, const std::string& server_hostname, const QuicConfig& config, @@ -96,6 +99,9 @@ class QuicClient : public EpollCallbackInterface { virtual void OnUnregistration(int fd, bool replaced) OVERRIDE {} virtual void OnShutdown(EpollServer* eps, int fd) OVERRIDE {} + // ReliableQuicStream::Visitor + virtual void OnClose(ReliableQuicStream* stream) OVERRIDE; + QuicPacketCreator::Options* options(); QuicClientSession* session() { return session_.get(); } @@ -190,6 +196,10 @@ class QuicClient : public EpollCallbackInterface { // Which QUIC version does this client talk? QuicVersion version_; + // If true, then the contents of each response will be printed to stdout + // when the stream is closed (in OnClose). + bool print_response_; + DISALLOW_COPY_AND_ASSIGN(QuicClient); }; |