| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 client/server reliable streams. | 5 // The base class for client/server reliable streams. |
| 6 | 6 |
| 7 // It does not contain the entire interface needed by an application to interact | 7 // It does not contain the entire interface needed by an application to interact |
| 8 // with a QUIC stream. Some parts of the interface must be obtained by | 8 // with a QUIC stream. Some parts of the interface must be obtained by |
| 9 // accessing the owning session object. A subclass of ReliableQuicStream | 9 // accessing the owning session object. A subclass of ReliableQuicStream |
| 10 // connects the object and the application that generates and consumes the data | 10 // connects the object and the application that generates and consumes the data |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 #include "base/basictypes.h" | 25 #include "base/basictypes.h" |
| 26 #include "base/memory/ref_counted.h" | 26 #include "base/memory/ref_counted.h" |
| 27 #include "base/strings/string_piece.h" | 27 #include "base/strings/string_piece.h" |
| 28 #include "net/base/iovec.h" | 28 #include "net/base/iovec.h" |
| 29 #include "net/base/net_export.h" | 29 #include "net/base/net_export.h" |
| 30 #include "net/quic/quic_flow_controller.h" | 30 #include "net/quic/quic_flow_controller.h" |
| 31 #include "net/quic/quic_protocol.h" | 31 #include "net/quic/quic_protocol.h" |
| 32 #include "net/quic/quic_stream_sequencer.h" | 32 #include "net/quic/quic_stream_sequencer.h" |
| 33 #include "net/quic/quic_types.h" | 33 #include "net/quic/quic_types.h" |
| 34 //#include "std::strings/std::stringpiece.h" |
| 35 //#include "util/refcount/reffed_ptr.h" |
| 36 // TODO(alyssar) remove this after cleaning Priority logic from this class. |
| 37 #include "net/quic/quic_write_blocked_list.h" |
| 34 | 38 |
| 35 namespace net { | 39 namespace net { |
| 36 | 40 |
| 37 namespace test { | 41 namespace test { |
| 38 class ReliableQuicStreamPeer; | 42 class ReliableQuicStreamPeer; |
| 39 } // namespace test | 43 } // namespace test |
| 40 | 44 |
| 41 class QuicSession; | 45 class QuicSession; |
| 42 | 46 |
| 43 class NET_EXPORT_PRIVATE ReliableQuicStream { | 47 class NET_EXPORT_PRIVATE ReliableQuicStream { |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 // Called by the subclass or the sequencer to reset the stream from this | 88 // Called by the subclass or the sequencer to reset the stream from this |
| 85 // end. | 89 // end. |
| 86 virtual void Reset(QuicRstStreamErrorCode error); | 90 virtual void Reset(QuicRstStreamErrorCode error); |
| 87 | 91 |
| 88 // Called by the subclass or the sequencer to close the entire connection from | 92 // Called by the subclass or the sequencer to close the entire connection from |
| 89 // this end. | 93 // this end. |
| 90 virtual void CloseConnection(QuicErrorCode error); | 94 virtual void CloseConnection(QuicErrorCode error); |
| 91 virtual void CloseConnectionWithDetails(QuicErrorCode error, | 95 virtual void CloseConnectionWithDetails(QuicErrorCode error, |
| 92 const std::string& details); | 96 const std::string& details); |
| 93 | 97 |
| 94 // Returns the effective priority for the stream. This value may change | 98 // Returns the priority for the stream. |
| 95 // during the life of the stream. | 99 virtual SpdyPriority Priority() const = 0; |
| 96 virtual QuicPriority Priority() const = 0; | |
| 97 | 100 |
| 98 QuicStreamId id() const { return id_; } | 101 QuicStreamId id() const { return id_; } |
| 99 | 102 |
| 100 QuicRstStreamErrorCode stream_error() const { return stream_error_; } | 103 QuicRstStreamErrorCode stream_error() const { return stream_error_; } |
| 101 QuicErrorCode connection_error() const { return connection_error_; } | 104 QuicErrorCode connection_error() const { return connection_error_; } |
| 102 | 105 |
| 103 bool reading_stopped() const { | 106 bool reading_stopped() const { |
| 104 return sequencer_.ignore_read_data() || read_side_closed_; | 107 return sequencer_.ignore_read_data() || read_side_closed_; |
| 105 } | 108 } |
| 106 bool write_side_closed() const { return write_side_closed_; } | 109 bool write_side_closed() const { return write_side_closed_; } |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 // connection level flow control limits (but are stream level flow control | 303 // connection level flow control limits (but are stream level flow control |
| 301 // limited). | 304 // limited). |
| 302 bool stream_contributes_to_connection_flow_control_; | 305 bool stream_contributes_to_connection_flow_control_; |
| 303 | 306 |
| 304 DISALLOW_COPY_AND_ASSIGN(ReliableQuicStream); | 307 DISALLOW_COPY_AND_ASSIGN(ReliableQuicStream); |
| 305 }; | 308 }; |
| 306 | 309 |
| 307 } // namespace net | 310 } // namespace net |
| 308 | 311 |
| 309 #endif // NET_QUIC_RELIABLE_QUIC_STREAM_H_ | 312 #endif // NET_QUIC_RELIABLE_QUIC_STREAM_H_ |
| OLD | NEW |