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 #include "net/quic/reliable_quic_stream.h" | 5 #include "net/quic/reliable_quic_stream.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "net/quic/iovector.h" | 8 #include "net/quic/iovector.h" |
9 #include "net/quic/quic_flow_controller.h" | 9 #include "net/quic/quic_flow_controller.h" |
10 #include "net/quic/quic_session.h" | 10 #include "net/quic/quic_session.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 rst_sent_(false), | 125 rst_sent_(false), |
126 rst_received_(false), | 126 rst_received_(false), |
127 is_server_(session_->is_server()), | 127 is_server_(session_->is_server()), |
128 flow_controller_( | 128 flow_controller_( |
129 session_->connection(), | 129 session_->connection(), |
130 id_, | 130 id_, |
131 is_server_, | 131 is_server_, |
132 session_->config()->HasReceivedInitialFlowControlWindowBytes() ? | 132 session_->config()->HasReceivedInitialFlowControlWindowBytes() ? |
133 session_->config()->ReceivedInitialFlowControlWindowBytes() : | 133 session_->config()->ReceivedInitialFlowControlWindowBytes() : |
134 kDefaultFlowControlSendWindow, | 134 kDefaultFlowControlSendWindow, |
135 session_->max_flow_control_receive_window_bytes(), | 135 session_->config()->GetInitialFlowControlWindowToSend(), |
136 session_->max_flow_control_receive_window_bytes()), | 136 session_->config()->GetInitialFlowControlWindowToSend()), |
137 connection_flow_controller_(session_->flow_controller()) { | 137 connection_flow_controller_(session_->flow_controller()) { |
138 } | 138 } |
139 | 139 |
140 ReliableQuicStream::~ReliableQuicStream() { | 140 ReliableQuicStream::~ReliableQuicStream() { |
141 } | 141 } |
142 | 142 |
143 bool ReliableQuicStream::OnStreamFrame(const QuicStreamFrame& frame) { | 143 bool ReliableQuicStream::OnStreamFrame(const QuicStreamFrame& frame) { |
144 if (read_side_closed_) { | 144 if (read_side_closed_) { |
145 DVLOG(1) << ENDPOINT << "Ignoring frame " << frame.stream_id; | 145 DVLOG(1) << ENDPOINT << "Ignoring frame " << frame.stream_id; |
146 // We don't want to be reading: blackhole the data. | 146 // We don't want to be reading: blackhole the data. |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 connection_flow_controller_->AddBytesConsumed(bytes); | 488 connection_flow_controller_->AddBytesConsumed(bytes); |
489 } | 489 } |
490 } | 490 } |
491 | 491 |
492 bool ReliableQuicStream::IsFlowControlBlocked() { | 492 bool ReliableQuicStream::IsFlowControlBlocked() { |
493 return flow_controller_.IsBlocked() || | 493 return flow_controller_.IsBlocked() || |
494 connection_flow_controller_->IsBlocked(); | 494 connection_flow_controller_->IsBlocked(); |
495 } | 495 } |
496 | 496 |
497 } // namespace net | 497 } // namespace net |
OLD | NEW |