| 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> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "net/quic/quic_crypto_client_stream.h" | 13 #include "net/quic/quic_crypto_client_stream.h" |
| 14 #include "net/quic/quic_protocol.h" | 14 #include "net/quic/quic_protocol.h" |
| 15 #include "net/quic/quic_session.h" | 15 #include "net/quic/quic_session.h" |
| 16 #include "net/tools/quic/quic_spdy_client_stream.h" | 16 #include "net/tools/quic/quic_spdy_client_stream.h" |
| 17 | 17 |
| 18 namespace net { | 18 namespace net { |
| 19 | 19 |
| 20 class QuicConnection; | 20 class QuicConnection; |
| 21 class QuicSessionKey; |
| 21 class ReliableQuicStream; | 22 class ReliableQuicStream; |
| 22 | 23 |
| 23 namespace tools { | 24 namespace tools { |
| 24 | 25 |
| 25 class QuicClientSession : public QuicSession { | 26 class QuicClientSession : public QuicSession { |
| 26 public: | 27 public: |
| 27 QuicClientSession(const std::string& server_hostname, | 28 QuicClientSession(const QuicSessionKey& session_key, |
| 28 const QuicConfig& config, | 29 const QuicConfig& config, |
| 29 QuicConnection* connection, | 30 QuicConnection* connection, |
| 30 QuicCryptoClientConfig* crypto_config); | 31 QuicCryptoClientConfig* crypto_config); |
| 31 virtual ~QuicClientSession(); | 32 virtual ~QuicClientSession(); |
| 32 | 33 |
| 33 // QuicSession methods: | 34 // QuicSession methods: |
| 34 virtual QuicSpdyClientStream* CreateOutgoingDataStream() OVERRIDE; | 35 virtual QuicSpdyClientStream* CreateOutgoingDataStream() OVERRIDE; |
| 35 virtual QuicCryptoClientStream* GetCryptoStream() OVERRIDE; | 36 virtual QuicCryptoClientStream* GetCryptoStream() OVERRIDE; |
| 36 | 37 |
| 37 // 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 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 50 private: | 51 private: |
| 51 QuicCryptoClientStream crypto_stream_; | 52 QuicCryptoClientStream crypto_stream_; |
| 52 | 53 |
| 53 DISALLOW_COPY_AND_ASSIGN(QuicClientSession); | 54 DISALLOW_COPY_AND_ASSIGN(QuicClientSession); |
| 54 }; | 55 }; |
| 55 | 56 |
| 56 } // namespace tools | 57 } // namespace tools |
| 57 } // namespace net | 58 } // namespace net |
| 58 | 59 |
| 59 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_SESSION_H_ | 60 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_SESSION_H_ |
| OLD | NEW |