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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 | 107 |
108 uint64 stream_bytes_read() const { return stream_bytes_read_; } | 108 uint64 stream_bytes_read() const { return stream_bytes_read_; } |
109 uint64 stream_bytes_written() const { return stream_bytes_written_; } | 109 uint64 stream_bytes_written() const { return stream_bytes_written_; } |
110 | 110 |
111 void set_fin_sent(bool fin_sent) { fin_sent_ = fin_sent; } | 111 void set_fin_sent(bool fin_sent) { fin_sent_ = fin_sent; } |
112 void set_rst_sent(bool rst_sent) { rst_sent_ = rst_sent; } | 112 void set_rst_sent(bool rst_sent) { rst_sent_ = rst_sent; } |
113 | 113 |
114 void set_fec_policy(FecPolicy fec_policy) { fec_policy_ = fec_policy; } | 114 void set_fec_policy(FecPolicy fec_policy) { fec_policy_ = fec_policy; } |
115 FecPolicy fec_policy() const { return fec_policy_; } | 115 FecPolicy fec_policy() const { return fec_policy_; } |
116 | 116 |
| 117 void set_rst_received(bool rst_received) { rst_received_ = rst_received; } |
| 118 void set_stream_error(QuicRstStreamErrorCode error) { stream_error_ = error; } |
| 119 |
117 // Adjust the flow control window according to new offset in |frame|. | 120 // Adjust the flow control window according to new offset in |frame|. |
118 virtual void OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame); | 121 virtual void OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame); |
119 | 122 |
120 // Used in Chrome. | 123 // Used in Chrome. |
121 int num_frames_received() const; | 124 int num_frames_received() const; |
122 int num_early_frames_received() const; | 125 int num_early_frames_received() const; |
123 int num_duplicate_frames_received() const; | 126 int num_duplicate_frames_received() const; |
124 | 127 |
125 QuicFlowController* flow_controller() { return &flow_controller_; } | 128 QuicFlowController* flow_controller() { return &flow_controller_; } |
126 | 129 |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 // connection level flow control limits (but are stream level flow control | 294 // connection level flow control limits (but are stream level flow control |
292 // limited). | 295 // limited). |
293 bool stream_contributes_to_connection_flow_control_; | 296 bool stream_contributes_to_connection_flow_control_; |
294 | 297 |
295 DISALLOW_COPY_AND_ASSIGN(ReliableQuicStream); | 298 DISALLOW_COPY_AND_ASSIGN(ReliableQuicStream); |
296 }; | 299 }; |
297 | 300 |
298 } // namespace net | 301 } // namespace net |
299 | 302 |
300 #endif // NET_QUIC_RELIABLE_QUIC_STREAM_H_ | 303 #endif // NET_QUIC_RELIABLE_QUIC_STREAM_H_ |
OLD | NEW |