virtual ~ReliableQuicStream();
// Called when a (potentially duplicate) stream frame has been received
- // for this stream. Returns false if this frame can not be accepted
- // because there is too much data already buffered.
- virtual bool OnStreamFrame(const QuicStreamFrame& frame);
+ // for this stream.
+ virtual void OnStreamFrame(const QuicStreamFrame& frame);
// Called when the connection becomes writeable to allow the stream
// to write any pending data.
void set_fin_sent(bool fin_sent) { fin_sent_ = fin_sent; }
void set_rst_sent(bool rst_sent) { rst_sent_ = rst_sent; }
+ void set_fec_policy(FecPolicy fec_policy) { fec_policy_ = fec_policy; }
+ FecPolicy fec_policy() const { return fec_policy_; }
+
// Adjust our flow control windows according to new offset in |frame|.
virtual void OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame);
bool fin_buffered() const { return fin_buffered_; }
- void set_fec_policy(FecPolicy fec_policy) { fec_policy_ = fec_policy; }
-
const QuicSession* session() const { return session_; }
QuicSession* session() { return session_; }
const QuicStreamSequencer* sequencer() const { return &sequencer_; }
QuicStreamSequencer* sequencer() { return &sequencer_; }
+ // TODO(rjshade): Remove this method when removing QUIC_VERSION_20.
void DisableFlowControl() {
flow_controller_.Disable();
}
+ void DisableConnectionFlowControlForThisStream() {
+ stream_contributes_to_connection_flow_control_ = false;
+ }
+
private:
friend class test::ReliableQuicStreamPeer;
friend class QuicStreamUtils;
// The connection level flow controller. Not owned.
QuicFlowController* connection_flow_controller_;
+ // Special streams, such as the crypto and headers streams, do not respect
+ // connection level flow control limits (but are stream level flow control
+ // limited).
+ bool stream_contributes_to_connection_flow_control_;
+
DISALLOW_COPY_AND_ASSIGN(ReliableQuicStream);
};