| 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/core/reliable_quic_stream.h" | 5 #include "net/quic/core/reliable_quic_stream.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "net/quic/core/quic_bug_tracker.h" | 8 #include "net/quic/core/quic_bug_tracker.h" |
| 9 #include "net/quic/core/quic_flags.h" | 9 #include "net/quic/core/quic_flags.h" |
| 10 #include "net/quic/core/quic_flow_controller.h" | 10 #include "net/quic/core/quic_flow_controller.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 DCHECK(!(read_side_closed_ && write_side_closed_)); | 88 DCHECK(!(read_side_closed_ && write_side_closed_)); |
| 89 | 89 |
| 90 if (frame.fin) { | 90 if (frame.fin) { |
| 91 fin_received_ = true; | 91 fin_received_ = true; |
| 92 if (fin_sent_) { | 92 if (fin_sent_) { |
| 93 session_->StreamDraining(id_); | 93 session_->StreamDraining(id_); |
| 94 } | 94 } |
| 95 } | 95 } |
| 96 | 96 |
| 97 if (read_side_closed_) { | 97 if (read_side_closed_) { |
| 98 DVLOG(1) << ENDPOINT << "Ignoring data in frame " << frame.stream_id; | 98 DVLOG(1) << ENDPOINT << "Stream " << frame.stream_id |
| 99 << " is closed for reading. Ignoring newly received stream data."; |
| 99 // The subclass does not want to read data: blackhole the data. | 100 // The subclass does not want to read data: blackhole the data. |
| 100 return; | 101 return; |
| 101 } | 102 } |
| 102 | 103 |
| 103 // This count includes duplicate data received. | 104 // This count includes duplicate data received. |
| 104 size_t frame_payload_size = frame.data_length; | 105 size_t frame_payload_size = frame.data_length; |
| 105 stream_bytes_read_ += frame_payload_size; | 106 stream_bytes_read_ += frame_payload_size; |
| 106 | 107 |
| 107 // Flow control is interested in tracking highest received offset. | 108 // Flow control is interested in tracking highest received offset. |
| 108 // Only interested in received frames that carry data. | 109 // Only interested in received frames that carry data. |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 } | 472 } |
| 472 } | 473 } |
| 473 | 474 |
| 474 void ReliableQuicStream::UpdateSendWindowOffset(QuicStreamOffset new_window) { | 475 void ReliableQuicStream::UpdateSendWindowOffset(QuicStreamOffset new_window) { |
| 475 if (flow_controller_.UpdateSendWindowOffset(new_window)) { | 476 if (flow_controller_.UpdateSendWindowOffset(new_window)) { |
| 476 OnCanWrite(); | 477 OnCanWrite(); |
| 477 } | 478 } |
| 478 } | 479 } |
| 479 | 480 |
| 480 } // namespace net | 481 } // namespace net |
| OLD | NEW |