| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 81 |
| 82 // Called by the session when headers with a priority have been received | 82 // Called by the session when headers with a priority have been received |
| 83 // for this stream. This method will only be called for server streams. | 83 // for this stream. This method will only be called for server streams. |
| 84 virtual void OnStreamHeadersPriority(SpdyPriority priority); | 84 virtual void OnStreamHeadersPriority(SpdyPriority priority); |
| 85 | 85 |
| 86 // Called by the session when decompressed headers have been completely | 86 // Called by the session when decompressed headers have been completely |
| 87 // delivered to this stream. If |fin| is true, then this stream | 87 // delivered to this stream. If |fin| is true, then this stream |
| 88 // should be closed; no more data will be sent by the peer. | 88 // should be closed; no more data will be sent by the peer. |
| 89 virtual void OnStreamHeadersComplete(bool fin, size_t frame_len); | 89 virtual void OnStreamHeadersComplete(bool fin, size_t frame_len); |
| 90 | 90 |
| 91 // Called by the session when decompressed PUSH_PROMISE headers data |
| 92 // is received for this stream. |
| 93 // May be called multiple times, with each call providing additional headers |
| 94 // data until OnPromiseHeadersComplete is called. |
| 95 virtual void OnPromiseHeaders(StringPiece headers_data); |
| 96 |
| 97 // Called by the session when decompressed push promise headers have |
| 98 // been completely delivered to this stream. |
| 99 virtual void OnPromiseHeadersComplete(QuicStreamId promised_id, |
| 100 size_t frame_len); |
| 101 |
| 91 // Override the base class to not discard response when receiving | 102 // Override the base class to not discard response when receiving |
| 92 // QUIC_STREAM_NO_ERROR on QUIC_VERSION_29 and later versions. | 103 // QUIC_STREAM_NO_ERROR on QUIC_VERSION_29 and later versions. |
| 93 void OnStreamReset(const QuicRstStreamFrame& frame) override; | 104 void OnStreamReset(const QuicRstStreamFrame& frame) override; |
| 94 | 105 |
| 95 // Writes the headers contained in |header_block| to the dedicated | 106 // Writes the headers contained in |header_block| to the dedicated |
| 96 // headers stream. | 107 // headers stream. |
| 97 virtual size_t WriteHeaders(const SpdyHeaderBlock& header_block, | 108 virtual size_t WriteHeaders(const SpdyHeaderBlock& header_block, |
| 98 bool fin, | 109 bool fin, |
| 99 QuicAckListenerInterface* ack_notifier_delegate); | 110 QuicAckListenerInterface* ack_notifier_delegate); |
| 100 | 111 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 // Contains a copy of the decompressed trailers until they are consumed | 184 // Contains a copy of the decompressed trailers until they are consumed |
| 174 // via ProcessData or Readv. | 185 // via ProcessData or Readv. |
| 175 std::string decompressed_trailers_; | 186 std::string decompressed_trailers_; |
| 176 | 187 |
| 177 DISALLOW_COPY_AND_ASSIGN(QuicSpdyStream); | 188 DISALLOW_COPY_AND_ASSIGN(QuicSpdyStream); |
| 178 }; | 189 }; |
| 179 | 190 |
| 180 } // namespace net | 191 } // namespace net |
| 181 | 192 |
| 182 #endif // NET_QUIC_QUIC_SPDY_STREAM_H_ | 193 #endif // NET_QUIC_QUIC_SPDY_STREAM_H_ |
| OLD | NEW |