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

Side by Side Diff: net/tools/quic/quic_client.h

Issue 100173005: Break out the basic reliable QUIC stream functionality from the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/quic/test_tools/reliable_quic_stream_peer.cc ('k') | net/tools/quic/quic_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // A toy client, which connects to a specified port and sends QUIC 5 // A toy client, which connects to a specified port and sends QUIC
6 // request to that endpoint. 6 // request to that endpoint.
7 7
8 #ifndef NET_TOOLS_QUIC_QUIC_CLIENT_H_ 8 #ifndef NET_TOOLS_QUIC_QUIC_CLIENT_H_
9 #define NET_TOOLS_QUIC_QUIC_CLIENT_H_ 9 #define NET_TOOLS_QUIC_QUIC_CLIENT_H_
10 10
(...skipping 16 matching lines...) Expand all
27 27
28 namespace tools { 28 namespace tools {
29 29
30 class QuicEpollConnectionHelper; 30 class QuicEpollConnectionHelper;
31 31
32 namespace test { 32 namespace test {
33 class QuicClientPeer; 33 class QuicClientPeer;
34 } // namespace test 34 } // namespace test
35 35
36 class QuicClient : public EpollCallbackInterface, 36 class QuicClient : public EpollCallbackInterface,
37 public ReliableQuicStream::Visitor { 37 public QuicDataStream::Visitor {
38 public: 38 public:
39 QuicClient(IPEndPoint server_address, 39 QuicClient(IPEndPoint server_address,
40 const string& server_hostname, 40 const string& server_hostname,
41 const QuicVersionVector& supported_versions, 41 const QuicVersionVector& supported_versions,
42 bool print_response); 42 bool print_response);
43 QuicClient(IPEndPoint server_address, 43 QuicClient(IPEndPoint server_address,
44 const std::string& server_hostname, 44 const std::string& server_hostname,
45 const QuicConfig& config, 45 const QuicConfig& config,
46 const QuicVersionVector& supported_versions); 46 const QuicVersionVector& supported_versions);
47 47
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 virtual void OnRegistration( 91 virtual void OnRegistration(
92 EpollServer* eps, int fd, int event_mask) OVERRIDE {} 92 EpollServer* eps, int fd, int event_mask) OVERRIDE {}
93 virtual void OnModification(int fd, int event_mask) OVERRIDE {} 93 virtual void OnModification(int fd, int event_mask) OVERRIDE {}
94 virtual void OnEvent(int fd, EpollEvent* event) OVERRIDE; 94 virtual void OnEvent(int fd, EpollEvent* event) OVERRIDE;
95 // |fd_| can be unregistered without the client being disconnected. This 95 // |fd_| can be unregistered without the client being disconnected. This
96 // happens in b3m QuicProber where we unregister |fd_| to feed in events to 96 // happens in b3m QuicProber where we unregister |fd_| to feed in events to
97 // the client from the SelectServer. 97 // the client from the SelectServer.
98 virtual void OnUnregistration(int fd, bool replaced) OVERRIDE {} 98 virtual void OnUnregistration(int fd, bool replaced) OVERRIDE {}
99 virtual void OnShutdown(EpollServer* eps, int fd) OVERRIDE {} 99 virtual void OnShutdown(EpollServer* eps, int fd) OVERRIDE {}
100 100
101 // ReliableQuicStream::Visitor 101 // QuicDataStream::Visitor
102 virtual void OnClose(ReliableQuicStream* stream) OVERRIDE; 102 virtual void OnClose(QuicDataStream* stream) OVERRIDE;
103 103
104 QuicPacketCreator::Options* options(); 104 QuicPacketCreator::Options* options();
105 105
106 QuicClientSession* session() { return session_.get(); } 106 QuicClientSession* session() { return session_.get(); }
107 107
108 bool connected() const; 108 bool connected() const;
109 109
110 void set_bind_to_address(IPAddressNumber address) { 110 void set_bind_to_address(IPAddressNumber address) {
111 bind_to_address_ = address; 111 bind_to_address_ = address;
112 } 112 }
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 // when the stream is closed (in OnClose). 208 // when the stream is closed (in OnClose).
209 bool print_response_; 209 bool print_response_;
210 210
211 DISALLOW_COPY_AND_ASSIGN(QuicClient); 211 DISALLOW_COPY_AND_ASSIGN(QuicClient);
212 }; 212 };
213 213
214 } // namespace tools 214 } // namespace tools
215 } // namespace net 215 } // namespace net
216 216
217 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_H_ 217 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_H_
OLDNEW
« no previous file with comments | « net/quic/test_tools/reliable_quic_stream_peer.cc ('k') | net/tools/quic/quic_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698