| 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 | 139 |
| 140 int fd() { return fd_; } | 140 int fd() { return fd_; } |
| 141 | 141 |
| 142 const QuicServerId& server_id() const { return server_id_; } | 142 const QuicServerId& server_id() const { return server_id_; } |
| 143 | 143 |
| 144 // This should only be set before the initial Connect() | 144 // This should only be set before the initial Connect() |
| 145 void set_server_id(const QuicServerId& server_id) { | 145 void set_server_id(const QuicServerId& server_id) { |
| 146 server_id_ = server_id; | 146 server_id_ = server_id; |
| 147 } | 147 } |
| 148 | 148 |
| 149 void SetUserAgentID(const string& user_agent_id) { |
| 150 crypto_config_.set_user_agent_id(user_agent_id); |
| 151 } |
| 152 |
| 149 // SetProofVerifier sets the ProofVerifier that will be used to verify the | 153 // SetProofVerifier sets the ProofVerifier that will be used to verify the |
| 150 // server's certificate and takes ownership of |verifier|. | 154 // server's certificate and takes ownership of |verifier|. |
| 151 void SetProofVerifier(ProofVerifier* verifier) { | 155 void SetProofVerifier(ProofVerifier* verifier) { |
| 152 // TODO(rtenneti): We should set ProofVerifier in QuicClientSession. | 156 // TODO(rtenneti): We should set ProofVerifier in QuicClientSession. |
| 153 crypto_config_.SetProofVerifier(verifier); | 157 crypto_config_.SetProofVerifier(verifier); |
| 154 } | 158 } |
| 155 | 159 |
| 156 // SetChannelIDSource sets a ChannelIDSource that will be called, when the | 160 // SetChannelIDSource sets a ChannelIDSource that will be called, when the |
| 157 // server supports channel IDs, to obtain a channel ID for signing a message | 161 // server supports channel IDs, to obtain a channel ID for signing a message |
| 158 // proving possession of the channel ID. This object takes ownership of | 162 // proving possession of the channel ID. This object takes ownership of |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 // when the stream is closed (in OnClose). | 252 // when the stream is closed (in OnClose). |
| 249 bool print_response_; | 253 bool print_response_; |
| 250 | 254 |
| 251 DISALLOW_COPY_AND_ASSIGN(QuicClient); | 255 DISALLOW_COPY_AND_ASSIGN(QuicClient); |
| 252 }; | 256 }; |
| 253 | 257 |
| 254 } // namespace tools | 258 } // namespace tools |
| 255 } // namespace net | 259 } // namespace net |
| 256 | 260 |
| 257 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_H_ | 261 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_H_ |
| OLD | NEW |