| 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 // The base class for client/server reliable streams. | 5 // The base class for client/server reliable streams. |
| 6 | 6 |
| 7 // It does not contain the entire interface needed by an application to interact | 7 // It does not contain the entire interface needed by an application to interact |
| 8 // with a QUIC stream. Some parts of the interface must be obtained by | 8 // with a QUIC stream. Some parts of the interface must be obtained by |
| 9 // accessing the owning session object. A subclass of ReliableQuicStream | 9 // accessing the owning session object. A subclass of ReliableQuicStream |
| 10 // connects the object and the application that generates and consumes the data | 10 // connects the object and the application that generates and consumes the data |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 void set_rst_sent(bool rst_sent) { rst_sent_ = rst_sent; } | 117 void set_rst_sent(bool rst_sent) { rst_sent_ = rst_sent; } |
| 118 | 118 |
| 119 void set_rst_received(bool rst_received) { rst_received_ = rst_received; } | 119 void set_rst_received(bool rst_received) { rst_received_ = rst_received; } |
| 120 void set_stream_error(QuicRstStreamErrorCode error) { stream_error_ = error; } | 120 void set_stream_error(QuicRstStreamErrorCode error) { stream_error_ = error; } |
| 121 | 121 |
| 122 // Adjust the flow control window according to new offset in |frame|. | 122 // Adjust the flow control window according to new offset in |frame|. |
| 123 virtual void OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame); | 123 virtual void OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame); |
| 124 | 124 |
| 125 // Used in Chrome. | 125 // Used in Chrome. |
| 126 int num_frames_received() const; | 126 int num_frames_received() const; |
| 127 int num_early_frames_received() const; | |
| 128 int num_duplicate_frames_received() const; | 127 int num_duplicate_frames_received() const; |
| 129 | 128 |
| 130 QuicFlowController* flow_controller() { return &flow_controller_; } | 129 QuicFlowController* flow_controller() { return &flow_controller_; } |
| 131 | 130 |
| 132 // Called when endpoint receives a frame which could increase the highest | 131 // Called when endpoint receives a frame which could increase the highest |
| 133 // offset. | 132 // offset. |
| 134 // Returns true if the highest offset did increase. | 133 // Returns true if the highest offset did increase. |
| 135 bool MaybeIncreaseHighestReceivedOffset(QuicStreamOffset new_offset); | 134 bool MaybeIncreaseHighestReceivedOffset(QuicStreamOffset new_offset); |
| 136 // Called when bytes are sent to the peer. | 135 // Called when bytes are sent to the peer. |
| 137 void AddBytesSent(QuicByteCount bytes); | 136 void AddBytesSent(QuicByteCount bytes); |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 // connection level flow control limits (but are stream level flow control | 302 // connection level flow control limits (but are stream level flow control |
| 304 // limited). | 303 // limited). |
| 305 bool stream_contributes_to_connection_flow_control_; | 304 bool stream_contributes_to_connection_flow_control_; |
| 306 | 305 |
| 307 DISALLOW_COPY_AND_ASSIGN(ReliableQuicStream); | 306 DISALLOW_COPY_AND_ASSIGN(ReliableQuicStream); |
| 308 }; | 307 }; |
| 309 | 308 |
| 310 } // namespace net | 309 } // namespace net |
| 311 | 310 |
| 312 #endif // NET_QUIC_RELIABLE_QUIC_STREAM_H_ | 311 #endif // NET_QUIC_RELIABLE_QUIC_STREAM_H_ |
| OLD | NEW |