| 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 client specific QuicSession subclass. | 5 // A client specific QuicSession subclass. |
| 6 | 6 |
| 7 #ifndef NET_TOOLS_QUIC_QUIC_CLIENT_SESSION_H_ | 7 #ifndef NET_TOOLS_QUIC_QUIC_CLIENT_SESSION_H_ |
| 8 #define NET_TOOLS_QUIC_QUIC_CLIENT_SESSION_H_ | 8 #define NET_TOOLS_QUIC_QUIC_CLIENT_SESSION_H_ |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 // QuicSession methods: | 34 // QuicSession methods: |
| 35 QuicSpdyClientStream* CreateOutgoingDataStream() override; | 35 QuicSpdyClientStream* CreateOutgoingDataStream() override; |
| 36 QuicCryptoClientStream* GetCryptoStream() override; | 36 QuicCryptoClientStream* GetCryptoStream() override; |
| 37 | 37 |
| 38 // QuicClientSessionBase methods: | 38 // QuicClientSessionBase methods: |
| 39 void OnProofValid(const QuicCryptoClientConfig::CachedState& cached) override; | 39 void OnProofValid(const QuicCryptoClientConfig::CachedState& cached) override; |
| 40 void OnProofVerifyDetailsAvailable( | 40 void OnProofVerifyDetailsAvailable( |
| 41 const ProofVerifyDetails& verify_details) override; | 41 const ProofVerifyDetails& verify_details) override; |
| 42 | 42 |
| 43 // Performs a crypto handshake with the server. Returns true if the crypto | 43 // Performs a crypto handshake with the server. |
| 44 // handshake is started successfully. | 44 void CryptoConnect(); |
| 45 bool CryptoConnect(); | |
| 46 | 45 |
| 47 // Returns the number of client hello messages that have been sent on the | 46 // Returns the number of client hello messages that have been sent on the |
| 48 // crypto stream. If the handshake has completed then this is one greater | 47 // crypto stream. If the handshake has completed then this is one greater |
| 49 // than the number of round-trips needed for the handshake. | 48 // than the number of round-trips needed for the handshake. |
| 50 int GetNumSentClientHellos() const; | 49 int GetNumSentClientHellos() const; |
| 51 | 50 |
| 52 protected: | 51 protected: |
| 53 // QuicSession methods: | 52 // QuicSession methods: |
| 54 QuicDataStream* CreateIncomingDataStream(QuicStreamId id) override; | 53 QuicDataStream* CreateIncomingDataStream(QuicStreamId id) override; |
| 55 | 54 |
| 56 private: | 55 private: |
| 57 scoped_ptr<QuicCryptoClientStream> crypto_stream_; | 56 scoped_ptr<QuicCryptoClientStream> crypto_stream_; |
| 58 | 57 |
| 59 DISALLOW_COPY_AND_ASSIGN(QuicClientSession); | 58 DISALLOW_COPY_AND_ASSIGN(QuicClientSession); |
| 60 }; | 59 }; |
| 61 | 60 |
| 62 } // namespace tools | 61 } // namespace tools |
| 63 } // namespace net | 62 } // namespace net |
| 64 | 63 |
| 65 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_SESSION_H_ | 64 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_SESSION_H_ |
| OLD | NEW |