| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 protected: | 60 protected: |
| 61 virtual ~Visitor() {} | 61 virtual ~Visitor() {} |
| 62 | 62 |
| 63 private: | 63 private: |
| 64 DISALLOW_COPY_AND_ASSIGN(Visitor); | 64 DISALLOW_COPY_AND_ASSIGN(Visitor); |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 QuicSpdyStream(QuicStreamId id, QuicSpdySession* spdy_session); | 67 QuicSpdyStream(QuicStreamId id, QuicSpdySession* spdy_session); |
| 68 ~QuicSpdyStream() override; | 68 ~QuicSpdyStream() override; |
| 69 | 69 |
| 70 // Override the base class to send QUIC_STREAM_NO_ERROR to the peer | |
| 71 // when the stream has not received all the data. | |
| 72 void CloseWriteSide() override; | |
| 73 void StopReading() override; | 70 void StopReading() override; |
| 74 | 71 |
| 75 // QuicStream implementation | 72 // QuicStream implementation |
| 76 void OnClose() override; | 73 void OnClose() override; |
| 77 | 74 |
| 78 // Override to maybe close the write side after writing. | 75 // Override to maybe close the write side after writing. |
| 79 void OnCanWrite() override; | 76 void OnCanWrite() override; |
| 80 | 77 |
| 81 // Called by the session when headers with a priority have been received | 78 // Called by the session when headers with a priority have been received |
| 82 // for this stream. This method will only be called for server streams. | 79 // for this stream. This method will only be called for server streams. |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 // Returns true if the sequencer has delivered the FIN, and no more body bytes | 173 // Returns true if the sequencer has delivered the FIN, and no more body bytes |
| 177 // will be available. | 174 // will be available. |
| 178 bool IsClosed() { return sequencer()->IsClosed(); } | 175 bool IsClosed() { return sequencer()->IsClosed(); } |
| 179 | 176 |
| 180 void set_allow_bidirectional_data(bool value) { | 177 void set_allow_bidirectional_data(bool value) { |
| 181 allow_bidirectional_data_ = value; | 178 allow_bidirectional_data_ = value; |
| 182 } | 179 } |
| 183 | 180 |
| 184 bool allow_bidirectional_data() const { return allow_bidirectional_data_; } | 181 bool allow_bidirectional_data() const { return allow_bidirectional_data_; } |
| 185 | 182 |
| 183 using QuicStream::CloseWriteSide; |
| 184 |
| 186 protected: | 185 protected: |
| 187 virtual void OnInitialHeadersComplete(bool fin, | 186 virtual void OnInitialHeadersComplete(bool fin, |
| 188 size_t frame_len, | 187 size_t frame_len, |
| 189 const QuicHeaderList& header_list); | 188 const QuicHeaderList& header_list); |
| 190 virtual void OnTrailingHeadersComplete(bool fin, | 189 virtual void OnTrailingHeadersComplete(bool fin, |
| 191 size_t frame_len, | 190 size_t frame_len, |
| 192 const QuicHeaderList& header_list); | 191 const QuicHeaderList& header_list); |
| 193 QuicSpdySession* spdy_session() const { return spdy_session_; } | 192 QuicSpdySession* spdy_session() const { return spdy_session_; } |
| 194 Visitor* visitor() { return visitor_; } | 193 Visitor* visitor() { return visitor_; } |
| 195 | 194 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 bool trailers_consumed_; | 226 bool trailers_consumed_; |
| 228 // The parsed trailers received from the peer. | 227 // The parsed trailers received from the peer. |
| 229 SpdyHeaderBlock received_trailers_; | 228 SpdyHeaderBlock received_trailers_; |
| 230 | 229 |
| 231 DISALLOW_COPY_AND_ASSIGN(QuicSpdyStream); | 230 DISALLOW_COPY_AND_ASSIGN(QuicSpdyStream); |
| 232 }; | 231 }; |
| 233 | 232 |
| 234 } // namespace net | 233 } // namespace net |
| 235 | 234 |
| 236 #endif // NET_QUIC_QUIC_SPDY_STREAM_H_ | 235 #endif // NET_QUIC_QUIC_SPDY_STREAM_H_ |
| OLD | NEW |