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 12 matching lines...) Expand all Loading... |
23 | 23 |
24 namespace tools { | 24 namespace tools { |
25 | 25 |
26 class QuicClientSession : public QuicClientSessionBase { | 26 class QuicClientSession : public QuicClientSessionBase { |
27 public: | 27 public: |
28 QuicClientSession(const QuicConfig& config, QuicConnection* connection); | 28 QuicClientSession(const QuicConfig& config, QuicConnection* connection); |
29 virtual ~QuicClientSession(); | 29 virtual ~QuicClientSession(); |
30 | 30 |
31 // QuicClientSessionBase methods: | 31 // QuicClientSessionBase methods: |
32 virtual void OnProofValid( | 32 virtual void OnProofValid( |
33 const QuicCryptoClientConfig::CachedState& cached) OVERRIDE; | 33 const QuicCryptoClientConfig::CachedState& cached) override; |
34 virtual void OnProofVerifyDetailsAvailable( | 34 virtual void OnProofVerifyDetailsAvailable( |
35 const ProofVerifyDetails& verify_details) OVERRIDE; | 35 const ProofVerifyDetails& verify_details) override; |
36 | 36 |
37 void InitializeSession(const QuicServerId& server_id, | 37 void InitializeSession(const QuicServerId& server_id, |
38 QuicCryptoClientConfig* config); | 38 QuicCryptoClientConfig* config); |
39 | 39 |
40 // QuicSession methods: | 40 // QuicSession methods: |
41 virtual QuicSpdyClientStream* CreateOutgoingDataStream() OVERRIDE; | 41 virtual QuicSpdyClientStream* CreateOutgoingDataStream() override; |
42 virtual QuicCryptoClientStream* GetCryptoStream() OVERRIDE; | 42 virtual QuicCryptoClientStream* GetCryptoStream() override; |
43 | 43 |
44 // Performs a crypto handshake with the server. Returns true if the crypto | 44 // Performs a crypto handshake with the server. Returns true if the crypto |
45 // handshake is started successfully. | 45 // handshake is started successfully. |
46 bool CryptoConnect(); | 46 bool CryptoConnect(); |
47 | 47 |
48 // Returns the number of client hello messages that have been sent on the | 48 // Returns the number of client hello messages that have been sent on the |
49 // crypto stream. If the handshake has completed then this is one greater | 49 // crypto stream. If the handshake has completed then this is one greater |
50 // than the number of round-trips needed for the handshake. | 50 // than the number of round-trips needed for the handshake. |
51 int GetNumSentClientHellos() const; | 51 int GetNumSentClientHellos() const; |
52 | 52 |
53 protected: | 53 protected: |
54 // QuicSession methods: | 54 // QuicSession methods: |
55 virtual QuicDataStream* CreateIncomingDataStream(QuicStreamId id) OVERRIDE; | 55 virtual QuicDataStream* CreateIncomingDataStream(QuicStreamId id) override; |
56 | 56 |
57 private: | 57 private: |
58 scoped_ptr<QuicCryptoClientStream> crypto_stream_; | 58 scoped_ptr<QuicCryptoClientStream> crypto_stream_; |
59 | 59 |
60 DISALLOW_COPY_AND_ASSIGN(QuicClientSession); | 60 DISALLOW_COPY_AND_ASSIGN(QuicClientSession); |
61 }; | 61 }; |
62 | 62 |
63 } // namespace tools | 63 } // namespace tools |
64 } // namespace net | 64 } // namespace net |
65 | 65 |
66 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_SESSION_H_ | 66 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_SESSION_H_ |
OLD | NEW |