| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 streams which deliver data to/from an application. | 5 // The base class for streams which deliver data to/from an application. |
| 6 // In each direction, the data on such a stream first contains compressed | 6 // In each direction, the data on such a stream first contains compressed |
| 7 // headers then body data. | 7 // headers then body data. |
| 8 | 8 |
| 9 #ifndef NET_QUIC_QUIC_SPDY_STREAM_H_ | 9 #ifndef NET_QUIC_QUIC_SPDY_STREAM_H_ |
| 10 #define NET_QUIC_QUIC_SPDY_STREAM_H_ | 10 #define NET_QUIC_QUIC_SPDY_STREAM_H_ |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 71 |
| 72 // Called by the session when headers with a priority have been received | 72 // Called by the session when headers with a priority have been received |
| 73 // for this stream. This method will only be called for server streams. | 73 // for this stream. This method will only be called for server streams. |
| 74 virtual void OnStreamHeadersPriority(QuicPriority priority); | 74 virtual void OnStreamHeadersPriority(QuicPriority priority); |
| 75 | 75 |
| 76 // Called by the session when decompressed headers have been completely | 76 // Called by the session when decompressed headers have been completely |
| 77 // delilvered to this stream. If |fin| is true, then this stream | 77 // delilvered to this stream. If |fin| is true, then this stream |
| 78 // should be closed; no more data will be sent by the peer. | 78 // should be closed; no more data will be sent by the peer. |
| 79 virtual void OnStreamHeadersComplete(bool fin, size_t frame_len); | 79 virtual void OnStreamHeadersComplete(bool fin, size_t frame_len); |
| 80 | 80 |
| 81 // Override the base class to not discard response when receiving |
| 82 // QUIC_STREAM_NO_ERROR on QUIC_VERSION_29 and later versions. |
| 83 void OnStreamReset(const QuicRstStreamFrame& frame) override; |
| 84 |
| 81 // Writes the headers contained in |header_block| to the dedicated | 85 // Writes the headers contained in |header_block| to the dedicated |
| 82 // headers stream. | 86 // headers stream. |
| 83 virtual size_t WriteHeaders(const SpdyHeaderBlock& header_block, | 87 virtual size_t WriteHeaders(const SpdyHeaderBlock& header_block, |
| 84 bool fin, | 88 bool fin, |
| 85 QuicAckListenerInterface* ack_notifier_delegate); | 89 QuicAckListenerInterface* ack_notifier_delegate); |
| 86 | 90 |
| 87 // Marks |bytes_consumed| of the headers data as consumed. | 91 // Marks |bytes_consumed| of the headers data as consumed. |
| 88 void MarkHeadersConsumed(size_t bytes_consumed); | 92 void MarkHeadersConsumed(size_t bytes_consumed); |
| 89 | 93 |
| 90 // This block of functions wraps the sequencer's functions of the same | 94 // This block of functions wraps the sequencer's functions of the same |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 // Contains a copy of the decompressed headers until they are consumed | 135 // Contains a copy of the decompressed headers until they are consumed |
| 132 // via ProcessData or Readv. | 136 // via ProcessData or Readv. |
| 133 std::string decompressed_headers_; | 137 std::string decompressed_headers_; |
| 134 | 138 |
| 135 DISALLOW_COPY_AND_ASSIGN(QuicSpdyStream); | 139 DISALLOW_COPY_AND_ASSIGN(QuicSpdyStream); |
| 136 }; | 140 }; |
| 137 | 141 |
| 138 } // namespace net | 142 } // namespace net |
| 139 | 143 |
| 140 #endif // NET_QUIC_QUIC_SPDY_STREAM_H_ | 144 #endif // NET_QUIC_QUIC_SPDY_STREAM_H_ |
| OLD | NEW |