Chromium Code Reviews| 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 "net/quic/quic_crypto_stream.h" | 8 #include "net/quic/quic_crypto_stream.h" |
| 9 | 9 |
| 10 namespace net { | 10 namespace net { |
| 11 | 11 |
| 12 class QuicSession; | 12 class QuicSession; |
| 13 struct CryptoHandshakeMessage; | 13 struct CryptoHandshakeMessage; |
| 14 | 14 |
| 15 class NET_EXPORT_PRIVATE QuicCryptoClientStream : public QuicCryptoStream { | 15 class NET_EXPORT_PRIVATE QuicCryptoClientStream : public QuicCryptoStream { |
| 16 | 16 |
| 17 public: | 17 public: |
| 18 explicit QuicCryptoClientStream(QuicSession* session); | 18 explicit QuicCryptoClientStream(QuicSession* session); |
| 19 | 19 |
| 20 // CryptoFramerVisitorInterface implementation | 20 // CryptoFramerVisitorInterface implementation |
| 21 virtual void OnHandshakeMessage( | 21 virtual void OnHandshakeMessage( |
| 22 const CryptoHandshakeMessage& message) OVERRIDE; | 22 const CryptoHandshakeMessage& message) OVERRIDE; |
| 23 | 23 |
| 24 // Performs a crypto handshake with the server. Returns true if the crypto | |
| 25 // handshake is started successfully. | |
| 26 bool CryptoConnect(); | |
| 27 | |
| 24 private: | 28 private: |
| 29 // Data members for encoding the ClientHello message. | |
| 30 QuicClientHelloConfig client_hello_config_; | |
| 31 // Client's connection nonce (4-byte timestamp + 28 random bytes) | |
| 32 std::string nonce_; | |
|
Ryan Hamilton
2012/12/22 22:31:32
nit: #include <string>
| |
| 33 | |
| 25 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientStream); | 34 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientStream); |
| 26 }; | 35 }; |
| 27 | 36 |
| 28 } // namespace net | 37 } // namespace net |
| 29 | 38 |
| 30 #endif // NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_H_ | 39 #endif // NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_H_ |
| OLD | NEW |