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 #ifndef NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_H_ | 5 #ifndef NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_H_ |
6 #define NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_H_ | 6 #define NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "net/quic/crypto/crypto_handshake.h" | 10 #include "net/quic/crypto/crypto_handshake.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 const CryptoHandshakeMessage& message) OVERRIDE; | 33 const CryptoHandshakeMessage& message) OVERRIDE; |
34 | 34 |
35 // Performs a crypto handshake with the server. Returns true if the crypto | 35 // Performs a crypto handshake with the server. Returns true if the crypto |
36 // handshake is started successfully. | 36 // handshake is started successfully. |
37 // TODO(agl): this should probably return void. | 37 // TODO(agl): this should probably return void. |
38 virtual bool CryptoConnect(); | 38 virtual bool CryptoConnect(); |
39 | 39 |
40 const QuicNegotiatedParameters& negotiated_params() const; | 40 const QuicNegotiatedParameters& negotiated_params() const; |
41 const QuicCryptoNegotiatedParameters& crypto_negotiated_params() const; | 41 const QuicCryptoNegotiatedParameters& crypto_negotiated_params() const; |
42 | 42 |
| 43 // num_sent_client_hellos returns the number of client hello messages that |
| 44 // have been sent. If the handshake has completed then this is one greater |
| 45 // than the number of round-trips needed for the handshake. |
| 46 int num_sent_client_hellos() const; |
| 47 |
43 private: | 48 private: |
44 friend class test::CryptoTestUtils; | 49 friend class test::CryptoTestUtils; |
45 | 50 |
46 enum State { | 51 enum State { |
47 STATE_IDLE, | 52 STATE_IDLE, |
48 STATE_SEND_CHLO, | 53 STATE_SEND_CHLO, |
49 STATE_RECV_REJ, | 54 STATE_RECV_REJ, |
50 STATE_RECV_SHLO, | 55 STATE_RECV_SHLO, |
51 }; | 56 }; |
52 | 57 |
(...skipping 22 matching lines...) Expand all Loading... |
75 std::string nonce_; | 80 std::string nonce_; |
76 // Server's hostname | 81 // Server's hostname |
77 std::string server_hostname_; | 82 std::string server_hostname_; |
78 | 83 |
79 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientStream); | 84 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientStream); |
80 }; | 85 }; |
81 | 86 |
82 } // namespace net | 87 } // namespace net |
83 | 88 |
84 #endif // NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_H_ | 89 #endif // NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_H_ |
OLD | NEW |