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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 // crypto stream. If the handshake has completed then this is one greater | 47 // crypto stream. If the handshake has completed then this is one greater |
48 // than the number of round-trips needed for the handshake. | 48 // than the number of round-trips needed for the handshake. |
49 int GetNumSentClientHellos() const; | 49 int GetNumSentClientHellos() const; |
50 | 50 |
51 void set_respect_goaway(bool respect_goaway) { | 51 void set_respect_goaway(bool respect_goaway) { |
52 respect_goaway_ = respect_goaway; | 52 respect_goaway_ = respect_goaway; |
53 } | 53 } |
54 | 54 |
55 protected: | 55 protected: |
56 // QuicSession methods: | 56 // QuicSession methods: |
57 QuicDataStream* CreateIncomingDynamicStream(QuicStreamId id) override; | 57 QuicSpdyStream* CreateIncomingDynamicStream(QuicStreamId id) override; |
58 | 58 |
59 // Unlike CreateOutgoingDynamicStream, which applies a bunch of sanity checks, | 59 // Unlike CreateOutgoingDynamicStream, which applies a bunch of sanity checks, |
60 // this simply returns a new QuicSpdyClientStream. This may be used by | 60 // this simply returns a new QuicSpdyClientStream. This may be used by |
61 // subclasses which want to use a subclass of QuicSpdyClientStream for streams | 61 // subclasses which want to use a subclass of QuicSpdyClientStream for streams |
62 // but wish to use the sanity checks in CreateOutgoingDynamicStream. | 62 // but wish to use the sanity checks in CreateOutgoingDynamicStream. |
63 virtual QuicSpdyClientStream* CreateClientStream(); | 63 virtual QuicSpdyClientStream* CreateClientStream(); |
64 | 64 |
65 private: | 65 private: |
66 scoped_ptr<QuicCryptoClientStream> crypto_stream_; | 66 scoped_ptr<QuicCryptoClientStream> crypto_stream_; |
67 | 67 |
68 // If this is set to false, the client will ignore server GOAWAYs and allow | 68 // If this is set to false, the client will ignore server GOAWAYs and allow |
69 // the creation of streams regardless of the high chance they will fail. | 69 // the creation of streams regardless of the high chance they will fail. |
70 bool respect_goaway_; | 70 bool respect_goaway_; |
71 | 71 |
72 DISALLOW_COPY_AND_ASSIGN(QuicClientSession); | 72 DISALLOW_COPY_AND_ASSIGN(QuicClientSession); |
73 }; | 73 }; |
74 | 74 |
75 } // namespace tools | 75 } // namespace tools |
76 } // namespace net | 76 } // namespace net |
77 | 77 |
78 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_SESSION_H_ | 78 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_SESSION_H_ |
OLD | NEW |