Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: net/quic/reliable_quic_stream.cc

Issue 1413373013: Quic streams honor RST_STREAM + NO_ERROR on the write side. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@106851267
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/reliable_quic_stream.h ('k') | net/tools/quic/end_to_end_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_ack_listener_interface.h" 9 #include "net/quic/quic_ack_listener_interface.h"
10 #include "net/quic/quic_flags.h" 10 #include "net/quic/quic_flags.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 // OnFinRead can be called due to a FIN flag in a headers block, so there may 174 // OnFinRead can be called due to a FIN flag in a headers block, so there may
175 // have been no OnStreamFrame call with a FIN in the frame. 175 // have been no OnStreamFrame call with a FIN in the frame.
176 fin_received_ = true; 176 fin_received_ = true;
177 // If fin_sent_ is true, then CloseWriteSide has already been called, and the 177 // If fin_sent_ is true, then CloseWriteSide has already been called, and the
178 // stream will be destroyed by CloseReadSide, so don't need to call 178 // stream will be destroyed by CloseReadSide, so don't need to call
179 // StreamDraining. 179 // StreamDraining.
180 CloseReadSide(); 180 CloseReadSide();
181 } 181 }
182 182
183 void ReliableQuicStream::Reset(QuicRstStreamErrorCode error) { 183 void ReliableQuicStream::Reset(QuicRstStreamErrorCode error) {
184 DCHECK_NE(QUIC_STREAM_NO_ERROR, error);
185 stream_error_ = error; 184 stream_error_ = error;
186 // Sending a RstStream results in calling CloseStream. 185 // Sending a RstStream results in calling CloseStream.
187 session()->SendRstStream(id(), error, stream_bytes_written_); 186 session()->SendRstStream(id(), error, stream_bytes_written_);
188 rst_sent_ = true; 187 rst_sent_ = true;
189 } 188 }
190 189
191 void ReliableQuicStream::CloseConnection(QuicErrorCode error) { 190 void ReliableQuicStream::CloseConnection(QuicErrorCode error) {
192 session()->connection()->SendConnectionClose(error); 191 session()->connection()->SendConnectionClose(error);
193 } 192 }
194 193
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 } 464 }
466 } 465 }
467 466
468 void ReliableQuicStream::UpdateSendWindowOffset(QuicStreamOffset new_window) { 467 void ReliableQuicStream::UpdateSendWindowOffset(QuicStreamOffset new_window) {
469 if (flow_controller_.UpdateSendWindowOffset(new_window)) { 468 if (flow_controller_.UpdateSendWindowOffset(new_window)) {
470 OnCanWrite(); 469 OnCanWrite();
471 } 470 }
472 } 471 }
473 472
474 } // namespace net 473 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/reliable_quic_stream.h ('k') | net/tools/quic/end_to_end_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698