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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 | 149 |
150 // Sets priority_ to priority. This should only be called before bytes are | 150 // Sets priority_ to priority. This should only be called before bytes are |
151 // written to the server. | 151 // written to the server. |
152 void SetPriority(SpdyPriority priority); | 152 void SetPriority(SpdyPriority priority); |
153 | 153 |
154 protected: | 154 protected: |
155 // Called by OnStreamHeadersComplete depending on which type (initial or | 155 // Called by OnStreamHeadersComplete depending on which type (initial or |
156 // trailing) headers are expected next. | 156 // trailing) headers are expected next. |
157 virtual void OnInitialHeadersComplete(bool fin, size_t frame_len); | 157 virtual void OnInitialHeadersComplete(bool fin, size_t frame_len); |
158 virtual void OnTrailingHeadersComplete(bool fin, size_t frame_len); | 158 virtual void OnTrailingHeadersComplete(bool fin, size_t frame_len); |
| 159 QuicSpdySession* spdy_session() const { return spdy_session_; } |
159 | 160 |
160 // Returns true if headers have been fully read and consumed. | 161 // Returns true if headers have been fully read and consumed. |
161 bool FinishedReadingHeaders() const; | 162 bool FinishedReadingHeaders() const; |
162 | 163 |
163 private: | 164 private: |
164 friend class test::QuicSpdyStreamPeer; | 165 friend class test::QuicSpdyStreamPeer; |
165 friend class test::ReliableQuicStreamPeer; | 166 friend class test::ReliableQuicStreamPeer; |
166 friend class QuicStreamUtils; | 167 friend class QuicStreamUtils; |
167 | 168 |
168 // Returns true if trailers have been fully read and consumed. | 169 // Returns true if trailers have been fully read and consumed. |
(...skipping 15 matching lines...) Expand all Loading... |
184 // Contains a copy of the decompressed trailers until they are consumed | 185 // Contains a copy of the decompressed trailers until they are consumed |
185 // via ProcessData or Readv. | 186 // via ProcessData or Readv. |
186 std::string decompressed_trailers_; | 187 std::string decompressed_trailers_; |
187 | 188 |
188 DISALLOW_COPY_AND_ASSIGN(QuicSpdyStream); | 189 DISALLOW_COPY_AND_ASSIGN(QuicSpdyStream); |
189 }; | 190 }; |
190 | 191 |
191 } // namespace net | 192 } // namespace net |
192 | 193 |
193 #endif // NET_QUIC_QUIC_SPDY_STREAM_H_ | 194 #endif // NET_QUIC_QUIC_SPDY_STREAM_H_ |
OLD | NEW |