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_SIMPLE_CLIENT_H_ | 8 #ifndef NET_TOOLS_QUIC_QUIC_SIMPLE_CLIENT_H_ |
9 #define NET_TOOLS_QUIC_QUIC_SIMPLE_CLIENT_H_ | 9 #define NET_TOOLS_QUIC_QUIC_SIMPLE_CLIENT_H_ |
10 | 10 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 QuicSimpleClient(QuicSocketAddress server_address, | 43 QuicSimpleClient(QuicSocketAddress server_address, |
44 const QuicServerId& server_id, | 44 const QuicServerId& server_id, |
45 const QuicVersionVector& supported_versions, | 45 const QuicVersionVector& supported_versions, |
46 std::unique_ptr<ProofVerifier> proof_verifier); | 46 std::unique_ptr<ProofVerifier> proof_verifier); |
47 | 47 |
48 ~QuicSimpleClient() override; | 48 ~QuicSimpleClient() override; |
49 | 49 |
50 // QuicChromiumPacketReader::Visitor | 50 // QuicChromiumPacketReader::Visitor |
51 void OnReadError(int result, const DatagramClientSocket* socket) override; | 51 void OnReadError(int result, const DatagramClientSocket* socket) override; |
52 bool OnPacket(const QuicReceivedPacket& packet, | 52 bool OnPacket(const QuicReceivedPacket& packet, |
53 const IPEndPoint& local_address, | 53 const QuicSocketAddress& local_address, |
54 const IPEndPoint& peer_address) override; | 54 const QuicSocketAddress& peer_address) override; |
55 | 55 |
56 // From QuicClientBase | 56 // From QuicClientBase |
57 QuicSocketAddress GetLatestClientAddress() const override; | 57 QuicSocketAddress GetLatestClientAddress() const override; |
58 | 58 |
59 protected: | 59 protected: |
60 // From QuicClientBase | 60 // From QuicClientBase |
61 QuicPacketWriter* CreateQuicPacketWriter() override; | 61 QuicPacketWriter* CreateQuicPacketWriter() override; |
62 void RunEventLoop() override; | 62 void RunEventLoop() override; |
63 bool CreateUDPSocketAndBind(QuicSocketAddress server_address, | 63 bool CreateUDPSocketAndBind(QuicSocketAddress server_address, |
64 QuicIpAddress bind_to_address, | 64 QuicIpAddress bind_to_address, |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 bool packet_reader_started_; | 96 bool packet_reader_started_; |
97 | 97 |
98 base::WeakPtrFactory<QuicSimpleClient> weak_factory_; | 98 base::WeakPtrFactory<QuicSimpleClient> weak_factory_; |
99 | 99 |
100 DISALLOW_COPY_AND_ASSIGN(QuicSimpleClient); | 100 DISALLOW_COPY_AND_ASSIGN(QuicSimpleClient); |
101 }; | 101 }; |
102 | 102 |
103 } // namespace net | 103 } // namespace net |
104 | 104 |
105 #endif // NET_TOOLS_QUIC_QUIC_SIMPLE_CLIENT_H_ | 105 #endif // NET_TOOLS_QUIC_QUIC_SIMPLE_CLIENT_H_ |
OLD | NEW |