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

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

Issue 683113005: Update from chromium https://crrev.com/302282 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « net/tools/quic/end_to_end_test.cc ('k') | net/tools/quic/quic_server_session.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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 void SetSupportedVersions(const QuicVersionVector& versions) { 164 void SetSupportedVersions(const QuicVersionVector& versions) {
165 supported_versions_ = versions; 165 supported_versions_ = versions;
166 } 166 }
167 167
168 // Takes ownership of the listener. 168 // Takes ownership of the listener.
169 void set_response_listener(ResponseListener* listener) { 169 void set_response_listener(ResponseListener* listener) {
170 response_listener_.reset(listener); 170 response_listener_.reset(listener);
171 } 171 }
172 172
173 QuicConfig* config() { return &config_; }
174
173 protected: 175 protected:
174 virtual QuicConnectionId GenerateConnectionId(); 176 virtual QuicConnectionId GenerateConnectionId();
175 virtual QuicEpollConnectionHelper* CreateQuicConnectionHelper(); 177 virtual QuicEpollConnectionHelper* CreateQuicConnectionHelper();
176 virtual QuicPacketWriter* CreateQuicPacketWriter(); 178 virtual QuicPacketWriter* CreateQuicPacketWriter();
177 179
178 virtual int ReadPacket(char* buffer, 180 virtual int ReadPacket(char* buffer,
179 int buffer_len, 181 int buffer_len,
180 IPEndPoint* server_address, 182 IPEndPoint* server_address,
181 IPAddressNumber* client_ip); 183 IPAddressNumber* client_ip);
182 184
183 EpollServer* epoll_server() { return epoll_server_; } 185 EpollServer* epoll_server() { return epoll_server_; }
184 QuicConfig* config() { return &config_; }
185 186
186 private: 187 private:
187 friend class net::tools::test::QuicClientPeer; 188 friend class net::tools::test::QuicClientPeer;
188 189
189 // A packet writer factory that always returns the same writer 190 // A packet writer factory that always returns the same writer
190 class DummyPacketWriterFactory : public QuicConnection::PacketWriterFactory { 191 class DummyPacketWriterFactory : public QuicConnection::PacketWriterFactory {
191 public: 192 public:
192 DummyPacketWriterFactory(QuicPacketWriter* writer); 193 DummyPacketWriterFactory(QuicPacketWriter* writer);
193 ~DummyPacketWriterFactory() override; 194 ~DummyPacketWriterFactory() override;
194 195
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 // when the stream is closed (in OnClose). 265 // when the stream is closed (in OnClose).
265 bool print_response_; 266 bool print_response_;
266 267
267 DISALLOW_COPY_AND_ASSIGN(QuicClient); 268 DISALLOW_COPY_AND_ASSIGN(QuicClient);
268 }; 269 };
269 270
270 } // namespace tools 271 } // namespace tools
271 } // namespace net 272 } // namespace net
272 273
273 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_H_ 274 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_H_
OLDNEW
« no previous file with comments | « net/tools/quic/end_to_end_test.cc ('k') | net/tools/quic/quic_server_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698