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> |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 // then the stream has been reset by this endpoint, not by the peer. | 261 // then the stream has been reset by this endpoint, not by the peer. |
262 void CloseStreamInner(QuicStreamId stream_id, bool locally_reset); | 262 void CloseStreamInner(QuicStreamId stream_id, bool locally_reset); |
263 | 263 |
264 // When a stream is closed locally, it may not yet know how many bytes the | 264 // When a stream is closed locally, it may not yet know how many bytes the |
265 // peer sent on that stream. | 265 // peer sent on that stream. |
266 // When this data arrives (via stream frame w. FIN, or RST) this method | 266 // When this data arrives (via stream frame w. FIN, or RST) this method |
267 // is called, and correctly updates the connection level flow controller. | 267 // is called, and correctly updates the connection level flow controller. |
268 void UpdateFlowControlOnFinalReceivedByteOffset( | 268 void UpdateFlowControlOnFinalReceivedByteOffset( |
269 QuicStreamId id, QuicStreamOffset final_byte_offset); | 269 QuicStreamId id, QuicStreamOffset final_byte_offset); |
270 | 270 |
| 271 // Called in OnConfigNegotiated when we receive a new stream level flow |
| 272 // control window in a negotiated config. Closes the connection if invalid. |
| 273 void OnNewStreamFlowControlWindow(uint32 new_window); |
| 274 |
| 275 // Called in OnConfigNegotiated when we receive a new session level flow |
| 276 // control window in a negotiated config. Closes the connection if invalid. |
| 277 void OnNewSessionFlowControlWindow(uint32 new_window); |
| 278 |
271 // Keep track of highest received byte offset of locally closed streams, while | 279 // Keep track of highest received byte offset of locally closed streams, while |
272 // waiting for a definitive final highest offset from the peer. | 280 // waiting for a definitive final highest offset from the peer. |
273 std::map<QuicStreamId, QuicStreamOffset> | 281 std::map<QuicStreamId, QuicStreamOffset> |
274 locally_closed_streams_highest_offset_; | 282 locally_closed_streams_highest_offset_; |
275 | 283 |
276 scoped_ptr<QuicConnection> connection_; | 284 scoped_ptr<QuicConnection> connection_; |
277 | 285 |
278 scoped_ptr<QuicHeadersStream> headers_stream_; | 286 scoped_ptr<QuicHeadersStream> headers_stream_; |
279 | 287 |
280 // A shim to stand between the connection and the session, to handle stream | 288 // A shim to stand between the connection and the session, to handle stream |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 | 322 |
315 // Used for session level flow control. | 323 // Used for session level flow control. |
316 scoped_ptr<QuicFlowController> flow_controller_; | 324 scoped_ptr<QuicFlowController> flow_controller_; |
317 | 325 |
318 DISALLOW_COPY_AND_ASSIGN(QuicSession); | 326 DISALLOW_COPY_AND_ASSIGN(QuicSession); |
319 }; | 327 }; |
320 | 328 |
321 } // namespace net | 329 } // namespace net |
322 | 330 |
323 #endif // NET_QUIC_QUIC_SESSION_H_ | 331 #endif // NET_QUIC_QUIC_SESSION_H_ |
OLD | NEW |