| 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 <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/containers/hash_tables.h" | 13 #include "base/containers/hash_tables.h" |
| 14 #include "net/base/ip_endpoint.h" | 14 #include "net/base/ip_endpoint.h" |
| 15 #include "net/base/linked_hash_map.h" | 15 #include "net/base/linked_hash_map.h" |
| 16 #include "net/quic/quic_connection.h" | 16 #include "net/quic/quic_connection.h" |
| 17 #include "net/quic/quic_crypto_stream.h" | 17 #include "net/quic/quic_crypto_stream.h" |
| 18 #include "net/quic/quic_data_stream.h" | 18 #include "net/quic/quic_data_stream.h" |
| 19 #include "net/quic/quic_headers_stream.h" | 19 #include "net/quic/quic_headers_stream.h" |
| 20 #include "net/quic/quic_packet_creator.h" | 20 #include "net/quic/quic_packet_creator.h" |
| 21 #include "net/quic/quic_protocol.h" | 21 #include "net/quic/quic_protocol.h" |
| 22 #include "net/quic/quic_spdy_compressor.h" | 22 #include "net/quic/quic_spdy_compressor.h" |
| 23 #include "net/quic/quic_spdy_decompressor.h" | 23 #include "net/quic/quic_spdy_decompressor.h" |
| 24 #include "net/quic/quic_write_blocked_list.h" |
| 24 #include "net/quic/reliable_quic_stream.h" | 25 #include "net/quic/reliable_quic_stream.h" |
| 25 #include "net/spdy/write_blocked_list.h" | |
| 26 | 26 |
| 27 namespace net { | 27 namespace net { |
| 28 | 28 |
| 29 class QuicCryptoStream; | 29 class QuicCryptoStream; |
| 30 class ReliableQuicStream; | 30 class ReliableQuicStream; |
| 31 class SSLInfo; | 31 class SSLInfo; |
| 32 class VisitorShim; | 32 class VisitorShim; |
| 33 | 33 |
| 34 namespace test { | 34 namespace test { |
| 35 class QuicSessionPeer; | 35 class QuicSessionPeer; |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 | 296 |
| 297 // Map from StreamId to pointers to streams that are owned by the caller. | 297 // Map from StreamId to pointers to streams that are owned by the caller. |
| 298 DataStreamMap stream_map_; | 298 DataStreamMap stream_map_; |
| 299 QuicStreamId next_stream_id_; | 299 QuicStreamId next_stream_id_; |
| 300 | 300 |
| 301 // Set of stream ids that have been "implicitly created" by receipt | 301 // Set of stream ids that have been "implicitly created" by receipt |
| 302 // of a stream id larger than the next expected stream id. | 302 // of a stream id larger than the next expected stream id. |
| 303 base::hash_set<QuicStreamId> implicitly_created_streams_; | 303 base::hash_set<QuicStreamId> implicitly_created_streams_; |
| 304 | 304 |
| 305 // A list of streams which need to write more data. | 305 // A list of streams which need to write more data. |
| 306 WriteBlockedList<QuicStreamId> write_blocked_streams_; | 306 QuicWriteBlockedList write_blocked_streams_; |
| 307 | 307 |
| 308 // A map of headers waiting to be compressed, and the streams | 308 // A map of headers waiting to be compressed, and the streams |
| 309 // they are associated with. | 309 // they are associated with. |
| 310 map<uint32, QuicStreamId> decompression_blocked_streams_; | 310 map<uint32, QuicStreamId> decompression_blocked_streams_; |
| 311 | 311 |
| 312 QuicStreamId largest_peer_created_stream_id_; | 312 QuicStreamId largest_peer_created_stream_id_; |
| 313 | 313 |
| 314 // The latched error with which the connection was closed. | 314 // The latched error with which the connection was closed. |
| 315 QuicErrorCode error_; | 315 QuicErrorCode error_; |
| 316 | 316 |
| 317 // Whether a GoAway has been received. | 317 // Whether a GoAway has been received. |
| 318 bool goaway_received_; | 318 bool goaway_received_; |
| 319 // Whether a GoAway has been sent. | 319 // Whether a GoAway has been sent. |
| 320 bool goaway_sent_; | 320 bool goaway_sent_; |
| 321 | 321 |
| 322 // Indicate if there is pending data for the crypto stream. | 322 // Indicate if there is pending data for the crypto stream. |
| 323 bool has_pending_handshake_; | 323 bool has_pending_handshake_; |
| 324 | 324 |
| 325 DISALLOW_COPY_AND_ASSIGN(QuicSession); | 325 DISALLOW_COPY_AND_ASSIGN(QuicSession); |
| 326 }; | 326 }; |
| 327 | 327 |
| 328 } // namespace net | 328 } // namespace net |
| 329 | 329 |
| 330 #endif // NET_QUIC_QUIC_SESSION_H_ | 330 #endif // NET_QUIC_QUIC_SESSION_H_ |
| OLD | NEW |