Chromium Code Reviews| 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 182 } | 182 } |
| 183 | 183 |
| 184 // Returns whatever trailers have been received for this stream. | 184 // Returns whatever trailers have been received for this stream. |
| 185 const SpdyHeaderBlock& received_trailers() const { | 185 const SpdyHeaderBlock& received_trailers() const { |
| 186 return received_trailers_; | 186 return received_trailers_; |
| 187 } | 187 } |
| 188 | 188 |
| 189 // Returns true if headers have been fully read and consumed. | 189 // Returns true if headers have been fully read and consumed. |
| 190 bool FinishedReadingHeaders() const; | 190 bool FinishedReadingHeaders() const; |
| 191 | 191 |
| 192 // Returns true if trailers have been fully read and consumed. | |
| 193 bool FinishedReadingTrailers() const; | |
| 194 | |
|
Zhongyi Shi
2016/10/05 23:16:29
You will need to create a internal CL to port the
| |
| 192 virtual SpdyPriority priority() const; | 195 virtual SpdyPriority priority() const; |
| 193 | 196 |
| 194 // Sets priority_ to priority. This should only be called before bytes are | 197 // Sets priority_ to priority. This should only be called before bytes are |
| 195 // written to the server. | 198 // written to the server. |
| 196 void SetPriority(SpdyPriority priority); | 199 void SetPriority(SpdyPriority priority); |
| 197 | 200 |
| 198 // Called when owning session is getting deleted to avoid subsequent | 201 // Called when owning session is getting deleted to avoid subsequent |
| 199 // use of the spdy_session_ member. | 202 // use of the spdy_session_ member. |
| 200 void ClearSession(); | 203 void ClearSession(); |
| 201 | 204 |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 223 QuicIOVector iov, | 226 QuicIOVector iov, |
| 224 QuicStreamOffset offset, | 227 QuicStreamOffset offset, |
| 225 bool fin, | 228 bool fin, |
| 226 QuicAckListenerInterface* ack_notifier_delegate) override; | 229 QuicAckListenerInterface* ack_notifier_delegate) override; |
| 227 | 230 |
| 228 private: | 231 private: |
| 229 friend class test::QuicSpdyStreamPeer; | 232 friend class test::QuicSpdyStreamPeer; |
| 230 friend class test::ReliableQuicStreamPeer; | 233 friend class test::ReliableQuicStreamPeer; |
| 231 friend class QuicStreamUtils; | 234 friend class QuicStreamUtils; |
| 232 | 235 |
| 233 // Returns true if trailers have been fully read and consumed. | |
| 234 bool FinishedReadingTrailers() const; | |
| 235 | |
| 236 QuicSpdySession* spdy_session_; | 236 QuicSpdySession* spdy_session_; |
| 237 | 237 |
| 238 Visitor* visitor_; | 238 Visitor* visitor_; |
| 239 // True if the headers have been completely decompressed. | 239 // True if the headers have been completely decompressed. |
| 240 bool headers_decompressed_; | 240 bool headers_decompressed_; |
| 241 // The priority of the stream, once parsed. | 241 // The priority of the stream, once parsed. |
| 242 SpdyPriority priority_; | 242 SpdyPriority priority_; |
| 243 // Contains a copy of the decompressed headers until they are consumed | 243 // Contains a copy of the decompressed headers until they are consumed |
| 244 // via ProcessData or Readv. | 244 // via ProcessData or Readv. |
| 245 std::string decompressed_headers_; | 245 std::string decompressed_headers_; |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 256 std::string decompressed_trailers_; | 256 std::string decompressed_trailers_; |
| 257 // The parsed trailers received from the peer. | 257 // The parsed trailers received from the peer. |
| 258 SpdyHeaderBlock received_trailers_; | 258 SpdyHeaderBlock received_trailers_; |
| 259 | 259 |
| 260 DISALLOW_COPY_AND_ASSIGN(QuicSpdyStream); | 260 DISALLOW_COPY_AND_ASSIGN(QuicSpdyStream); |
| 261 }; | 261 }; |
| 262 | 262 |
| 263 } // namespace net | 263 } // namespace net |
| 264 | 264 |
| 265 #endif // NET_QUIC_QUIC_SPDY_STREAM_H_ | 265 #endif // NET_QUIC_QUIC_SPDY_STREAM_H_ |
| OLD | NEW |