| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 base class for the toy client, which connects to a specified port and sends | 5 // A base class for the toy client, which connects to a specified port and sends |
| 6 // QUIC request to that endpoint. | 6 // QUIC request to that endpoint. |
| 7 | 7 |
| 8 #ifndef NET_TOOLS_QUIC_QUIC_CLIENT_BASE_H_ | 8 #ifndef NET_TOOLS_QUIC_QUIC_CLIENT_BASE_H_ |
| 9 #define NET_TOOLS_QUIC_QUIC_CLIENT_BASE_H_ | 9 #define NET_TOOLS_QUIC_QUIC_CLIENT_BASE_H_ |
| 10 | 10 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 | 158 |
| 159 ProofVerifier* proof_verifier() const; | 159 ProofVerifier* proof_verifier() const; |
| 160 | 160 |
| 161 void set_session(QuicClientSession* session) { session_.reset(session); } | 161 void set_session(QuicClientSession* session) { session_.reset(session); } |
| 162 | 162 |
| 163 QuicClientPushPromiseIndex* push_promise_index() { | 163 QuicClientPushPromiseIndex* push_promise_index() { |
| 164 return &push_promise_index_; | 164 return &push_promise_index_; |
| 165 } | 165 } |
| 166 | 166 |
| 167 protected: | 167 protected: |
| 168 // Takes ownership of |connection|. |
| 168 virtual QuicClientSession* CreateQuicClientSession( | 169 virtual QuicClientSession* CreateQuicClientSession( |
| 169 QuicConnection* connection); | 170 QuicConnection* connection); |
| 170 | 171 |
| 171 // Generates the next ConnectionId for |server_id_|. By default, if the | 172 // Generates the next ConnectionId for |server_id_|. By default, if the |
| 172 // cached server config contains a server-designated ID, that ID will be | 173 // cached server config contains a server-designated ID, that ID will be |
| 173 // returned. Otherwise, the next random ID will be returned. | 174 // returned. Otherwise, the next random ID will be returned. |
| 174 QuicConnectionId GetNextConnectionId(); | 175 QuicConnectionId GetNextConnectionId(); |
| 175 | 176 |
| 176 // Returns the next server-designated ConnectionId from the cached config for | 177 // Returns the next server-designated ConnectionId from the cached config for |
| 177 // |server_id_|, if it exists. Otherwise, returns 0. | 178 // |server_id_|, if it exists. Otherwise, returns 0. |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 bool connected_or_attempting_connect_; | 249 bool connected_or_attempting_connect_; |
| 249 | 250 |
| 250 QuicClientPushPromiseIndex push_promise_index_; | 251 QuicClientPushPromiseIndex push_promise_index_; |
| 251 | 252 |
| 252 DISALLOW_COPY_AND_ASSIGN(QuicClientBase); | 253 DISALLOW_COPY_AND_ASSIGN(QuicClientBase); |
| 253 }; | 254 }; |
| 254 | 255 |
| 255 } // namespace net | 256 } // namespace net |
| 256 | 257 |
| 257 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_BASE_H_ | 258 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_BASE_H_ |
| OLD | NEW |