| 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 // Implements ProcessPacketInterface. This will be called for each received | 186 // Implements ProcessPacketInterface. This will be called for each received |
| 187 // packet. | 187 // packet. |
| 188 void ProcessPacket(const IPEndPoint& self_address, | 188 void ProcessPacket(const IPEndPoint& self_address, |
| 189 const IPEndPoint& peer_address, | 189 const IPEndPoint& peer_address, |
| 190 const QuicEncryptedPacket& packet) override; | 190 const QuicEncryptedPacket& packet) override; |
| 191 | 191 |
| 192 QuicClientPushPromiseIndex* push_promise_index() { | 192 QuicClientPushPromiseIndex* push_promise_index() { |
| 193 return &push_promise_index_; | 193 return &push_promise_index_; |
| 194 } | 194 } |
| 195 | 195 |
| 196 protected: | |
| 197 virtual QuicPacketWriter* CreateQuicPacketWriter(); | 196 virtual QuicPacketWriter* CreateQuicPacketWriter(); |
| 198 virtual QuicPacketReader* CreateQuicPacketReader(); | |
| 199 | 197 |
| 200 // If |fd| is an open UDP socket, unregister and close it. Otherwise, do | 198 // If |fd| is an open UDP socket, unregister and close it. Otherwise, do |
| 201 // nothing. | 199 // nothing. |
| 202 virtual void CleanUpUDPSocket(int fd); | 200 virtual void CleanUpUDPSocket(int fd); |
| 203 | 201 |
| 204 // Unregister and close all open UDP sockets. | 202 // Unregister and close all open UDP sockets. |
| 205 virtual void CleanUpAllUDPSockets(); | 203 virtual void CleanUpAllUDPSockets(); |
| 206 | 204 |
| 207 EpollServer* epoll_server() { return epoll_server_; } | 205 EpollServer* epoll_server() { return epoll_server_; } |
| 208 | 206 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 QuicPacketReader* packet_reader_; | 310 QuicPacketReader* packet_reader_; |
| 313 | 311 |
| 314 std::unique_ptr<ClientQuicDataToResend> push_promise_data_to_resend_; | 312 std::unique_ptr<ClientQuicDataToResend> push_promise_data_to_resend_; |
| 315 | 313 |
| 316 DISALLOW_COPY_AND_ASSIGN(QuicClient); | 314 DISALLOW_COPY_AND_ASSIGN(QuicClient); |
| 317 }; | 315 }; |
| 318 | 316 |
| 319 } // namespace net | 317 } // namespace net |
| 320 | 318 |
| 321 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_H_ | 319 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_H_ |
| OLD | NEW |