| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 virtual void OnPromiseHeaderList(QuicStreamId promised_id, | 113 virtual void OnPromiseHeaderList(QuicStreamId promised_id, |
| 114 size_t frame_len, | 114 size_t frame_len, |
| 115 const QuicHeaderList& header_list); | 115 const QuicHeaderList& header_list); |
| 116 | 116 |
| 117 // Override the base class to not discard response when receiving | 117 // Override the base class to not discard response when receiving |
| 118 // QUIC_STREAM_NO_ERROR on QUIC_VERSION_29 and later versions. | 118 // QUIC_STREAM_NO_ERROR on QUIC_VERSION_29 and later versions. |
| 119 void OnStreamReset(const QuicRstStreamFrame& frame) override; | 119 void OnStreamReset(const QuicRstStreamFrame& frame) override; |
| 120 | 120 |
| 121 // Writes the headers contained in |header_block| to the dedicated | 121 // Writes the headers contained in |header_block| to the dedicated |
| 122 // headers stream. | 122 // headers stream. |
| 123 virtual size_t WriteHeaders(const SpdyHeaderBlock& header_block, | 123 virtual size_t WriteHeaders(SpdyHeaderBlock header_block, |
| 124 bool fin, | 124 bool fin, |
| 125 QuicAckListenerInterface* ack_notifier_delegate); | 125 QuicAckListenerInterface* ack_notifier_delegate); |
| 126 | 126 |
| 127 // Sends |data| to the peer, or buffers if it can't be sent immediately. | 127 // Sends |data| to the peer, or buffers if it can't be sent immediately. |
| 128 void WriteOrBufferBody(const std::string& data, | 128 void WriteOrBufferBody(const std::string& data, |
| 129 bool fin, | 129 bool fin, |
| 130 QuicAckListenerInterface* ack_notifier_delegate); | 130 QuicAckListenerInterface* ack_notifier_delegate); |
| 131 | 131 |
| 132 // Writes the trailers contained in |trailer_block| to the dedicated | 132 // Writes the trailers contained in |trailer_block| to the dedicated |
| 133 // headers stream. Trailers will always have the FIN set. | 133 // headers stream. Trailers will always have the FIN set. |
| 134 virtual size_t WriteTrailers(const SpdyHeaderBlock& trailer_block, | 134 virtual size_t WriteTrailers(SpdyHeaderBlock trailer_block, |
| 135 QuicAckListenerInterface* ack_notifier_delegate); | 135 QuicAckListenerInterface* ack_notifier_delegate); |
| 136 | 136 |
| 137 // Marks |bytes_consumed| of the headers data as consumed. | 137 // Marks |bytes_consumed| of the headers data as consumed. |
| 138 void MarkHeadersConsumed(size_t bytes_consumed); | 138 void MarkHeadersConsumed(size_t bytes_consumed); |
| 139 | 139 |
| 140 // Marks |bytes_consumed| of the trailers data as consumed. | 140 // Marks |bytes_consumed| of the trailers data as consumed. |
| 141 void MarkTrailersConsumed(size_t bytes_consumed); | 141 void MarkTrailersConsumed(size_t bytes_consumed); |
| 142 | 142 |
| 143 // Marks the trailers as consumed. | 143 // Marks the trailers as consumed. |
| 144 void MarkTrailersDelivered(); | 144 void MarkTrailersDelivered(); |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 std::string decompressed_trailers_; | 240 std::string decompressed_trailers_; |
| 241 // The parsed trailers received from the peer. | 241 // The parsed trailers received from the peer. |
| 242 SpdyHeaderBlock received_trailers_; | 242 SpdyHeaderBlock received_trailers_; |
| 243 | 243 |
| 244 DISALLOW_COPY_AND_ASSIGN(QuicSpdyStream); | 244 DISALLOW_COPY_AND_ASSIGN(QuicSpdyStream); |
| 245 }; | 245 }; |
| 246 | 246 |
| 247 } // namespace net | 247 } // namespace net |
| 248 | 248 |
| 249 #endif // NET_QUIC_QUIC_SPDY_STREAM_H_ | 249 #endif // NET_QUIC_QUIC_SPDY_STREAM_H_ |
| OLD | NEW |