| OLD | NEW |
| 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 // Helper to be used by created connections. | 239 // Helper to be used by created connections. |
| 240 scoped_ptr<QuicEpollConnectionHelper> helper_; | 240 scoped_ptr<QuicEpollConnectionHelper> helper_; |
| 241 | 241 |
| 242 // Listens for full responses. | 242 // Listens for full responses. |
| 243 scoped_ptr<ResponseListener> response_listener_; | 243 scoped_ptr<ResponseListener> response_listener_; |
| 244 | 244 |
| 245 // Tracks if the client is initialized to connect. | 245 // Tracks if the client is initialized to connect. |
| 246 bool initialized_; | 246 bool initialized_; |
| 247 | 247 |
| 248 // If overflow_supported_ is true, this will be the number of packets dropped | 248 // If overflow_supported_ is true, this will be the number of packets dropped |
| 249 // during the lifetime of the server. This may overflow if enough packets | 249 // during the lifetime of the server. |
| 250 // are dropped. | 250 QuicPacketCount packets_dropped_; |
| 251 uint32 packets_dropped_; | |
| 252 | 251 |
| 253 // True if the kernel supports SO_RXQ_OVFL, the number of packets dropped | 252 // True if the kernel supports SO_RXQ_OVFL, the number of packets dropped |
| 254 // because the socket would otherwise overflow. | 253 // because the socket would otherwise overflow. |
| 255 bool overflow_supported_; | 254 bool overflow_supported_; |
| 256 | 255 |
| 257 // This vector contains QUIC versions which we currently support. | 256 // This vector contains QUIC versions which we currently support. |
| 258 // This should be ordered such that the highest supported version is the first | 257 // This should be ordered such that the highest supported version is the first |
| 259 // element, with subsequent elements in descending order (versions can be | 258 // element, with subsequent elements in descending order (versions can be |
| 260 // skipped as necessary). We will always pick supported_versions_[0] as the | 259 // skipped as necessary). We will always pick supported_versions_[0] as the |
| 261 // initial version to use. | 260 // initial version to use. |
| 262 QuicVersionVector supported_versions_; | 261 QuicVersionVector supported_versions_; |
| 263 | 262 |
| 264 // If true, then the contents of each response will be printed to stdout | 263 // If true, then the contents of each response will be printed to stdout |
| 265 // when the stream is closed (in OnClose). | 264 // when the stream is closed (in OnClose). |
| 266 bool print_response_; | 265 bool print_response_; |
| 267 | 266 |
| 268 DISALLOW_COPY_AND_ASSIGN(QuicClient); | 267 DISALLOW_COPY_AND_ASSIGN(QuicClient); |
| 269 }; | 268 }; |
| 270 | 269 |
| 271 } // namespace tools | 270 } // namespace tools |
| 272 } // namespace net | 271 } // namespace net |
| 273 | 272 |
| 274 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_H_ | 273 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_H_ |
| OLD | NEW |