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 server specific QuicSession subclass. | 5 // A server specific QuicSession subclass. |
6 | 6 |
7 #ifndef NET_QUIC_CORE_QUIC_SERVER_SESSION_BASE_H_ | 7 #ifndef NET_QUIC_CORE_QUIC_SERVER_SESSION_BASE_H_ |
8 #define NET_QUIC_CORE_QUIC_SERVER_SESSION_BASE_H_ | 8 #define NET_QUIC_CORE_QUIC_SERVER_SESSION_BASE_H_ |
9 | 9 |
10 #include <cstdint> | 10 #include <cstdint> |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 // Override base class to process bandwidth related config received from | 62 // Override base class to process bandwidth related config received from |
63 // client. | 63 // client. |
64 void OnConfigNegotiated() override; | 64 void OnConfigNegotiated() override; |
65 | 65 |
66 void set_serving_region(const std::string& serving_region) { | 66 void set_serving_region(const std::string& serving_region) { |
67 serving_region_ = serving_region; | 67 serving_region_ = serving_region; |
68 } | 68 } |
69 | 69 |
70 protected: | 70 protected: |
71 // QuicSession methods(override them with return type of QuicSpdyStream*): | 71 // QuicSession methods(override them with return type of QuicSpdyStream*): |
72 QuicCryptoServerStreamBase* GetCryptoStream() override; | 72 QuicCryptoServerStreamBase* GetMutableCryptoStream() override; |
| 73 |
| 74 const QuicCryptoServerStreamBase* GetCryptoStream() const override; |
73 | 75 |
74 // If an outgoing stream can be created, return true. | 76 // If an outgoing stream can be created, return true. |
75 // Return false when connection is closed or forward secure encryption hasn't | 77 // Return false when connection is closed or forward secure encryption hasn't |
76 // established yet or number of server initiated streams already reaches the | 78 // established yet or number of server initiated streams already reaches the |
77 // upper limit. | 79 // upper limit. |
78 bool ShouldCreateOutgoingDynamicStream() override; | 80 bool ShouldCreateOutgoingDynamicStream() override; |
79 | 81 |
80 // If we should create an incoming stream, returns true. Otherwise | 82 // If we should create an incoming stream, returns true. Otherwise |
81 // does error handling, including communicating the error to the client and | 83 // does error handling, including communicating the error to the client and |
82 // possibly closing the connection, and returns false. | 84 // possibly closing the connection, and returns false. |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 // should go away once we fix http://b//27897982 | 129 // should go away once we fix http://b//27897982 |
128 int32_t BandwidthToCachedParameterBytesPerSecond( | 130 int32_t BandwidthToCachedParameterBytesPerSecond( |
129 const QuicBandwidth& bandwidth); | 131 const QuicBandwidth& bandwidth); |
130 | 132 |
131 DISALLOW_COPY_AND_ASSIGN(QuicServerSessionBase); | 133 DISALLOW_COPY_AND_ASSIGN(QuicServerSessionBase); |
132 }; | 134 }; |
133 | 135 |
134 } // namespace net | 136 } // namespace net |
135 | 137 |
136 #endif // NET_QUIC_CORE_QUIC_SERVER_SESSION_BASE_H_ | 138 #endif // NET_QUIC_CORE_QUIC_SERVER_SESSION_BASE_H_ |
OLD | NEW |