| 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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 void Resend() override; | 231 void Resend() override; |
| 232 | 232 |
| 233 private: | 233 private: |
| 234 QuicClient* client_; | 234 QuicClient* client_; |
| 235 | 235 |
| 236 DISALLOW_COPY_AND_ASSIGN(ClientQuicDataToResend); | 236 DISALLOW_COPY_AND_ASSIGN(ClientQuicDataToResend); |
| 237 }; | 237 }; |
| 238 | 238 |
| 239 // Used during initialization: creates the UDP socket FD, sets socket options, | 239 // Used during initialization: creates the UDP socket FD, sets socket options, |
| 240 // and binds the socket to our address. | 240 // and binds the socket to our address. |
| 241 bool CreateUDPSocket(); | 241 bool CreateUDPSocketAndBind(); |
| 242 | 242 |
| 243 // Actually clean up |fd|. | 243 // Actually clean up |fd|. |
| 244 void CleanUpUDPSocketImpl(int fd); | 244 void CleanUpUDPSocketImpl(int fd); |
| 245 | 245 |
| 246 // Read a UDP packet and hand it to the framer. | 246 // Read a UDP packet and hand it to the framer. |
| 247 bool ReadAndProcessPacket(); | 247 bool ReadAndProcessPacket(); |
| 248 | 248 |
| 249 // Read available UDP packets up to kNumPacketsPerReadCall | 249 // Read available UDP packets up to kNumPacketsPerReadCall |
| 250 // and hand them to the connection. | 250 // and hand them to the connection. |
| 251 // TODO(rtenneti): Add support for ReadAndProcessPackets(). | 251 // TODO(rtenneti): Add support for ReadAndProcessPackets(). |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 QuicPacketReader* packet_reader_; | 317 QuicPacketReader* packet_reader_; |
| 318 | 318 |
| 319 std::unique_ptr<ClientQuicDataToResend> push_promise_data_to_resend_; | 319 std::unique_ptr<ClientQuicDataToResend> push_promise_data_to_resend_; |
| 320 | 320 |
| 321 DISALLOW_COPY_AND_ASSIGN(QuicClient); | 321 DISALLOW_COPY_AND_ASSIGN(QuicClient); |
| 322 }; | 322 }; |
| 323 | 323 |
| 324 } // namespace net | 324 } // namespace net |
| 325 | 325 |
| 326 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_H_ | 326 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_H_ |
| OLD | NEW |