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 class QuicClientSession : public QuicSession { | 24 class QuicClientSession : public QuicSession { |
25 public: | 25 public: |
26 QuicClientSession(const std::string& server_hostname, | 26 QuicClientSession(const std::string& server_hostname, |
27 const QuicConfig& config, | 27 const QuicConfig& config, |
28 QuicConnection* connection, | 28 QuicConnection* connection, |
29 QuicCryptoClientConfig* crypto_config); | 29 QuicCryptoClientConfig* crypto_config); |
30 virtual ~QuicClientSession(); | 30 virtual ~QuicClientSession(); |
31 | 31 |
32 // QuicSession methods: | 32 // QuicSession methods: |
33 virtual QuicSpdyClientStream* CreateOutgoingReliableStream() OVERRIDE; | 33 virtual QuicSpdyClientStream* CreateOutgoingDataStream() OVERRIDE; |
34 virtual QuicCryptoClientStream* GetCryptoStream() OVERRIDE; | 34 virtual QuicCryptoClientStream* GetCryptoStream() OVERRIDE; |
35 | 35 |
36 // Performs a crypto handshake with the server. Returns true if the crypto | 36 // Performs a crypto handshake with the server. Returns true if the crypto |
37 // handshake is started successfully. | 37 // handshake is started successfully. |
38 bool CryptoConnect(); | 38 bool CryptoConnect(); |
39 | 39 |
40 // Returns the number of client hello messages that have been sent on the | 40 // Returns the number of client hello messages that have been sent on the |
41 // crypto stream. If the handshake has completed then this is one greater | 41 // crypto stream. If the handshake has completed then this is one greater |
42 // than the number of round-trips needed for the handshake. | 42 // than the number of round-trips needed for the handshake. |
43 int GetNumSentClientHellos() const; | 43 int GetNumSentClientHellos() const; |
44 | 44 |
45 protected: | 45 protected: |
46 // QuicSession methods: | 46 // QuicSession methods: |
47 virtual ReliableQuicStream* CreateIncomingReliableStream( | 47 virtual QuicDataStream* CreateIncomingDataStream(QuicStreamId id) OVERRIDE; |
48 QuicStreamId id) OVERRIDE; | |
49 | 48 |
50 private: | 49 private: |
51 QuicCryptoClientStream crypto_stream_; | 50 QuicCryptoClientStream crypto_stream_; |
52 | 51 |
53 DISALLOW_COPY_AND_ASSIGN(QuicClientSession); | 52 DISALLOW_COPY_AND_ASSIGN(QuicClientSession); |
54 }; | 53 }; |
55 | 54 |
56 } // namespace tools | 55 } // namespace tools |
57 } // namespace net | 56 } // namespace net |
58 | 57 |
59 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_SESSION_H_ | 58 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_SESSION_H_ |
OLD | NEW |