| 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 virtual QuicPacketWriter* CreateQuicPacketWriter(); | 174 virtual QuicPacketWriter* CreateQuicPacketWriter(); |
| 175 | 175 |
| 176 virtual int ReadPacket(char* buffer, | 176 virtual int ReadPacket(char* buffer, |
| 177 int buffer_len, | 177 int buffer_len, |
| 178 IPEndPoint* server_address, | 178 IPEndPoint* server_address, |
| 179 IPAddressNumber* client_ip); | 179 IPAddressNumber* client_ip); |
| 180 | 180 |
| 181 private: | 181 private: |
| 182 friend class net::tools::test::QuicClientPeer; | 182 friend class net::tools::test::QuicClientPeer; |
| 183 | 183 |
| 184 // Used during initialization: creates the UDP socket FD, sets socket options, |
| 185 // and binds the socket to our address. |
| 186 bool CreateUDPSocket(); |
| 187 |
| 184 // Read a UDP packet and hand it to the framer. | 188 // Read a UDP packet and hand it to the framer. |
| 185 bool ReadAndProcessPacket(); | 189 bool ReadAndProcessPacket(); |
| 186 | 190 |
| 187 // Address of the server. | 191 // Address of the server. |
| 188 const IPEndPoint server_address_; | 192 const IPEndPoint server_address_; |
| 189 | 193 |
| 190 // |server_id_| is a tuple (hostname, port, is_https) of the server. | 194 // |server_id_| is a tuple (hostname, port, is_https) of the server. |
| 191 QuicServerId server_id_; | 195 QuicServerId server_id_; |
| 192 | 196 |
| 193 // config_ and crypto_config_ contain configuration and cached state about | 197 // config_ and crypto_config_ contain configuration and cached state about |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 // Size of initial flow control receive window to advertise to server. | 249 // Size of initial flow control receive window to advertise to server. |
| 246 uint32 initial_flow_control_window_; | 250 uint32 initial_flow_control_window_; |
| 247 | 251 |
| 248 DISALLOW_COPY_AND_ASSIGN(QuicClient); | 252 DISALLOW_COPY_AND_ASSIGN(QuicClient); |
| 249 }; | 253 }; |
| 250 | 254 |
| 251 } // namespace tools | 255 } // namespace tools |
| 252 } // namespace net | 256 } // namespace net |
| 253 | 257 |
| 254 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_H_ | 258 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_H_ |
| OLD | NEW |