| 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_CORE_QUIC_SESSION_H_ | 7 #ifndef NET_QUIC_CORE_QUIC_SESSION_H_ |
| 8 #define NET_QUIC_CORE_QUIC_SESSION_H_ | 8 #define NET_QUIC_CORE_QUIC_SESSION_H_ |
| 9 | 9 |
| 10 #include <cstddef> | 10 #include <cstddef> |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 // exists, the connection is closed. | 285 // exists, the connection is closed. |
| 286 // Caller does not own the returned stream. | 286 // Caller does not own the returned stream. |
| 287 QuicStream* GetOrCreateDynamicStream(QuicStreamId stream_id); | 287 QuicStream* GetOrCreateDynamicStream(QuicStreamId stream_id); |
| 288 | 288 |
| 289 // Performs the work required to close |stream_id|. If |locally_reset| | 289 // Performs the work required to close |stream_id|. If |locally_reset| |
| 290 // then the stream has been reset by this endpoint, not by the peer. | 290 // then the stream has been reset by this endpoint, not by the peer. |
| 291 virtual void CloseStreamInner(QuicStreamId stream_id, bool locally_reset); | 291 virtual void CloseStreamInner(QuicStreamId stream_id, bool locally_reset); |
| 292 | 292 |
| 293 // When a stream is closed locally, it may not yet know how many bytes the | 293 // When a stream is closed locally, it may not yet know how many bytes the |
| 294 // peer sent on that stream. | 294 // peer sent on that stream. |
| 295 // When this data arrives (via stream frame w. FIN, or RST) this method | 295 // When this data arrives (via stream frame w. FIN, trailing headers, or RST) |
| 296 // is called, and correctly updates the connection level flow controller. | 296 // this method is called, and correctly updates the connection level flow |
| 297 void UpdateFlowControlOnFinalReceivedByteOffset( | 297 // controller. |
| 298 QuicStreamId id, | 298 void OnFinalByteOffsetReceived(QuicStreamId id, |
| 299 QuicStreamOffset final_byte_offset); | 299 QuicStreamOffset final_byte_offset); |
| 300 | 300 |
| 301 // Return true if given stream is peer initiated. | 301 // Return true if given stream is peer initiated. |
| 302 bool IsIncomingStream(QuicStreamId id) const; | 302 bool IsIncomingStream(QuicStreamId id) const; |
| 303 | 303 |
| 304 StaticStreamMap& static_streams() { return static_stream_map_; } | 304 StaticStreamMap& static_streams() { return static_stream_map_; } |
| 305 const StaticStreamMap& static_streams() const { return static_stream_map_; } | 305 const StaticStreamMap& static_streams() const { return static_stream_map_; } |
| 306 | 306 |
| 307 DynamicStreamMap& dynamic_streams() { return dynamic_stream_map_; } | 307 DynamicStreamMap& dynamic_streams() { return dynamic_stream_map_; } |
| 308 const DynamicStreamMap& dynamic_streams() const { | 308 const DynamicStreamMap& dynamic_streams() const { |
| 309 return dynamic_stream_map_; | 309 return dynamic_stream_map_; |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 // The stream id which was last popped in OnCanWrite, or 0, if not under the | 441 // The stream id which was last popped in OnCanWrite, or 0, if not under the |
| 442 // call stack of OnCanWrite. | 442 // call stack of OnCanWrite. |
| 443 QuicStreamId currently_writing_stream_id_; | 443 QuicStreamId currently_writing_stream_id_; |
| 444 | 444 |
| 445 DISALLOW_COPY_AND_ASSIGN(QuicSession); | 445 DISALLOW_COPY_AND_ASSIGN(QuicSession); |
| 446 }; | 446 }; |
| 447 | 447 |
| 448 } // namespace net | 448 } // namespace net |
| 449 | 449 |
| 450 #endif // NET_QUIC_CORE_QUIC_SESSION_H_ | 450 #endif // NET_QUIC_CORE_QUIC_SESSION_H_ |
| OLD | NEW |