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 #ifndef NET_QUIC_RELIABLE_QUIC_STREAM_H_ | 7 #ifndef NET_QUIC_RELIABLE_QUIC_STREAM_H_ |
8 #define NET_QUIC_RELIABLE_QUIC_STREAM_H_ | 8 #define NET_QUIC_RELIABLE_QUIC_STREAM_H_ |
9 | 9 |
10 #include <sys/types.h> | 10 #include <sys/types.h> |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 void set_fin_sent(bool fin_sent) { fin_sent_ = fin_sent; } | 90 void set_fin_sent(bool fin_sent) { fin_sent_ = fin_sent; } |
91 void set_rst_sent(bool rst_sent) { rst_sent_ = rst_sent; } | 91 void set_rst_sent(bool rst_sent) { rst_sent_ = rst_sent; } |
92 | 92 |
93 void set_fec_policy(FecPolicy fec_policy) { fec_policy_ = fec_policy; } | 93 void set_fec_policy(FecPolicy fec_policy) { fec_policy_ = fec_policy; } |
94 FecPolicy fec_policy() const { return fec_policy_; } | 94 FecPolicy fec_policy() const { return fec_policy_; } |
95 | 95 |
96 // Adjust our flow control windows according to new offset in |frame|. | 96 // Adjust our flow control windows according to new offset in |frame|. |
97 virtual void OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame); | 97 virtual void OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame); |
98 | 98 |
99 int num_frames_received() const; | 99 int num_frames_received() const; |
100 | 100 int num_early_frames_received() const; |
101 int num_duplicate_frames_received() const; | 101 int num_duplicate_frames_received() const; |
102 | 102 |
103 QuicFlowController* flow_controller() { return &flow_controller_; } | 103 QuicFlowController* flow_controller() { return &flow_controller_; } |
104 | 104 |
105 // Called when we see a frame which could increase the highest offset. | 105 // Called when we see a frame which could increase the highest offset. |
106 // Returns true if the highest offset did increase. | 106 // Returns true if the highest offset did increase. |
107 bool MaybeIncreaseHighestReceivedOffset(QuicStreamOffset new_offset); | 107 bool MaybeIncreaseHighestReceivedOffset(QuicStreamOffset new_offset); |
108 // Called when bytese are sent to the peer. | 108 // Called when bytese are sent to the peer. |
109 void AddBytesSent(QuicByteCount bytes); | 109 void AddBytesSent(QuicByteCount bytes); |
110 // Called by the stream sequencer as bytes are consumed from the buffer. | 110 // Called by the stream sequencer as bytes are consumed from the buffer. |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 // connection level flow control limits (but are stream level flow control | 244 // connection level flow control limits (but are stream level flow control |
245 // limited). | 245 // limited). |
246 bool stream_contributes_to_connection_flow_control_; | 246 bool stream_contributes_to_connection_flow_control_; |
247 | 247 |
248 DISALLOW_COPY_AND_ASSIGN(ReliableQuicStream); | 248 DISALLOW_COPY_AND_ASSIGN(ReliableQuicStream); |
249 }; | 249 }; |
250 | 250 |
251 } // namespace net | 251 } // namespace net |
252 | 252 |
253 #endif // NET_QUIC_RELIABLE_QUIC_STREAM_H_ | 253 #endif // NET_QUIC_RELIABLE_QUIC_STREAM_H_ |
OLD | NEW |