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 QuicSession, which demuxes a single connection to individual streams. | 5 // A QuicSession, which demuxes a single connection to individual streams. |
6 | 6 |
7 #ifndef NET_QUIC_QUIC_SESSION_H_ | 7 #ifndef NET_QUIC_QUIC_SESSION_H_ |
8 #define NET_QUIC_QUIC_SESSION_H_ | 8 #define NET_QUIC_QUIC_SESSION_H_ |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 // Returns true if any stream is flow controller blocked. | 212 // Returns true if any stream is flow controller blocked. |
213 bool IsStreamFlowControlBlocked(); | 213 bool IsStreamFlowControlBlocked(); |
214 | 214 |
215 // Returns true if this is a secure QUIC session. | 215 // Returns true if this is a secure QUIC session. |
216 bool IsSecure() const { | 216 bool IsSecure() const { |
217 return connection()->is_secure(); | 217 return connection()->is_secure(); |
218 } | 218 } |
219 | 219 |
220 size_t get_max_open_streams() const { return max_open_streams_; } | 220 size_t get_max_open_streams() const { return max_open_streams_; } |
221 | 221 |
| 222 // Used in Chrome. |
222 const QuicHeadersStream* headers_stream() { return headers_stream_.get(); } | 223 const QuicHeadersStream* headers_stream() { return headers_stream_.get(); } |
223 | 224 |
224 protected: | 225 protected: |
225 typedef base::hash_map<QuicStreamId, QuicDataStream*> DataStreamMap; | 226 typedef base::hash_map<QuicStreamId, QuicDataStream*> DataStreamMap; |
226 | 227 |
227 // Creates a new stream, owned by the caller, to handle a peer-initiated | 228 // Creates a new stream, owned by the caller, to handle a peer-initiated |
228 // stream. Returns nullptr and does error handling if the stream can not be | 229 // stream. Returns nullptr and does error handling if the stream can not be |
229 // created. | 230 // created. |
230 virtual QuicDataStream* CreateIncomingDataStream(QuicStreamId id) = 0; | 231 virtual QuicDataStream* CreateIncomingDataStream(QuicStreamId id) = 0; |
231 | 232 |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 | 336 |
336 // Indicate if there is pending data for the crypto stream. | 337 // Indicate if there is pending data for the crypto stream. |
337 bool has_pending_handshake_; | 338 bool has_pending_handshake_; |
338 | 339 |
339 DISALLOW_COPY_AND_ASSIGN(QuicSession); | 340 DISALLOW_COPY_AND_ASSIGN(QuicSession); |
340 }; | 341 }; |
341 | 342 |
342 } // namespace net | 343 } // namespace net |
343 | 344 |
344 #endif // NET_QUIC_QUIC_SESSION_H_ | 345 #endif // NET_QUIC_QUIC_SESSION_H_ |
OLD | NEW |