| 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 } | 150 } |
| 151 QuicConnectionId connection_id() const { | 151 QuicConnectionId connection_id() const { |
| 152 return connection_->connection_id(); | 152 return connection_->connection_id(); |
| 153 } | 153 } |
| 154 | 154 |
| 155 // Returns the number of currently open streams, including those which have | 155 // Returns the number of currently open streams, including those which have |
| 156 // been implicitly created, but excluding the reserved headers and crypto | 156 // been implicitly created, but excluding the reserved headers and crypto |
| 157 // streams. | 157 // streams. |
| 158 virtual size_t GetNumOpenStreams() const; | 158 virtual size_t GetNumOpenStreams() const; |
| 159 | 159 |
| 160 void MarkWriteBlocked(QuicStreamId id, QuicPriority priority); | 160 // Add the stream to the session's write-blocked list because it is blocked by |
| 161 // connection-level flow control but not by its own stream-level flow control. |
| 162 // The stream will be given a chance to write when a connection-level |
| 163 // WINDOW_UPDATE arrives. |
| 164 void MarkConnectionLevelWriteBlocked(QuicStreamId id, QuicPriority priority); |
| 161 | 165 |
| 162 // Returns true if the session has data to be sent, either queued in the | 166 // Returns true if the session has data to be sent, either queued in the |
| 163 // connection, or in a write-blocked stream. | 167 // connection, or in a write-blocked stream. |
| 164 bool HasDataToWrite() const; | 168 bool HasDataToWrite() const; |
| 165 | 169 |
| 166 bool goaway_received() const { return goaway_received_; } | 170 bool goaway_received() const { return goaway_received_; } |
| 167 | 171 |
| 168 bool goaway_sent() const { return goaway_sent_; } | 172 bool goaway_sent() const { return goaway_sent_; } |
| 169 | 173 |
| 170 QuicErrorCode error() const { return error_; } | 174 QuicErrorCode error() const { return error_; } |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 | 321 |
| 318 // Indicate if there is pending data for the crypto stream. | 322 // Indicate if there is pending data for the crypto stream. |
| 319 bool has_pending_handshake_; | 323 bool has_pending_handshake_; |
| 320 | 324 |
| 321 DISALLOW_COPY_AND_ASSIGN(QuicSession); | 325 DISALLOW_COPY_AND_ASSIGN(QuicSession); |
| 322 }; | 326 }; |
| 323 | 327 |
| 324 } // namespace net | 328 } // namespace net |
| 325 | 329 |
| 326 #endif // NET_QUIC_QUIC_SESSION_H_ | 330 #endif // NET_QUIC_QUIC_SESSION_H_ |
| OLD | NEW |