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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 virtual size_t GetNumActiveStreams() const; | 161 virtual size_t GetNumActiveStreams() const; |
162 | 162 |
163 // Returns the number of "available" streams, the stream ids less than | 163 // Returns the number of "available" streams, the stream ids less than |
164 // largest_peer_created_stream_id_ that have not yet been opened. | 164 // largest_peer_created_stream_id_ that have not yet been opened. |
165 virtual size_t GetNumAvailableStreams() const; | 165 virtual size_t GetNumAvailableStreams() const; |
166 | 166 |
167 // Add the stream to the session's write-blocked list because it is blocked by | 167 // Add the stream to the session's write-blocked list because it is blocked by |
168 // connection-level flow control but not by its own stream-level flow control. | 168 // connection-level flow control but not by its own stream-level flow control. |
169 // The stream will be given a chance to write when a connection-level | 169 // The stream will be given a chance to write when a connection-level |
170 // WINDOW_UPDATE arrives. | 170 // WINDOW_UPDATE arrives. |
171 void MarkConnectionLevelWriteBlocked(QuicStreamId id, QuicPriority priority); | 171 void MarkConnectionLevelWriteBlocked(QuicStreamId id, SpdyPriority priority); |
172 | 172 |
173 // Returns true if the session has data to be sent, either queued in the | 173 // Returns true if the session has data to be sent, either queued in the |
174 // connection, or in a write-blocked stream. | 174 // connection, or in a write-blocked stream. |
175 bool HasDataToWrite() const; | 175 bool HasDataToWrite() const; |
176 | 176 |
177 bool goaway_sent() const; | 177 bool goaway_sent() const; |
178 | 178 |
179 bool goaway_received() const; | 179 bool goaway_received() const; |
180 | 180 |
181 QuicErrorCode error() const { return error_; } | 181 QuicErrorCode error() const { return error_; } |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 QuicWriteBlockedList write_blocked_streams_; | 328 QuicWriteBlockedList write_blocked_streams_; |
329 | 329 |
330 QuicStreamId largest_peer_created_stream_id_; | 330 QuicStreamId largest_peer_created_stream_id_; |
331 | 331 |
332 // The latched error with which the connection was closed. | 332 // The latched error with which the connection was closed. |
333 QuicErrorCode error_; | 333 QuicErrorCode error_; |
334 | 334 |
335 // Used for connection-level flow control. | 335 // Used for connection-level flow control. |
336 QuicFlowController flow_controller_; | 336 QuicFlowController flow_controller_; |
337 | 337 |
338 // Indicate if there is pending data for the crypto stream. | |
339 bool has_pending_handshake_; | |
340 | |
341 DISALLOW_COPY_AND_ASSIGN(QuicSession); | 338 DISALLOW_COPY_AND_ASSIGN(QuicSession); |
342 }; | 339 }; |
343 | 340 |
344 } // namespace net | 341 } // namespace net |
345 | 342 |
346 #endif // NET_QUIC_QUIC_SESSION_H_ | 343 #endif // NET_QUIC_QUIC_SESSION_H_ |
OLD | NEW |