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 21 matching lines...) Expand all Loading... |
32 virtual ~QuicClientSession(); | 32 virtual ~QuicClientSession(); |
33 | 33 |
34 // QuicSession methods: | 34 // QuicSession methods: |
35 virtual QuicReliableClientStream* CreateOutgoingReliableStream() OVERRIDE; | 35 virtual QuicReliableClientStream* CreateOutgoingReliableStream() OVERRIDE; |
36 virtual QuicCryptoClientStream* GetCryptoStream() OVERRIDE; | 36 virtual QuicCryptoClientStream* GetCryptoStream() OVERRIDE; |
37 | 37 |
38 // Performs a crypto handshake with the server. Returns true if the crypto | 38 // Performs a crypto handshake with the server. Returns true if the crypto |
39 // handshake is started successfully. | 39 // handshake is started successfully. |
40 bool CryptoConnect(); | 40 bool CryptoConnect(); |
41 | 41 |
| 42 // Returns the number of client hello messages that have been sent on the |
| 43 // crypto stream. If the handshake has completed then this is one greater |
| 44 // than the number of round-trips needed for the handshake. |
| 45 int GetNumSentClientHellos() const; |
| 46 |
42 protected: | 47 protected: |
43 // QuicSession methods: | 48 // QuicSession methods: |
44 virtual ReliableQuicStream* CreateIncomingReliableStream( | 49 virtual ReliableQuicStream* CreateIncomingReliableStream( |
45 QuicStreamId id) OVERRIDE; | 50 QuicStreamId id) OVERRIDE; |
46 | 51 |
47 private: | 52 private: |
48 QuicCryptoClientStream crypto_stream_; | 53 QuicCryptoClientStream crypto_stream_; |
49 | 54 |
50 DISALLOW_COPY_AND_ASSIGN(QuicClientSession); | 55 DISALLOW_COPY_AND_ASSIGN(QuicClientSession); |
51 }; | 56 }; |
52 | 57 |
53 } // namespace tools | 58 } // namespace tools |
54 } // namespace net | 59 } // namespace net |
55 | 60 |
56 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_SESSION_H_ | 61 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_SESSION_H_ |
OLD | NEW |