| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 // peer. | 69 // peer. |
| 70 virtual void OnStreamReset(const QuicRstStreamFrame& frame); | 70 virtual void OnStreamReset(const QuicRstStreamFrame& frame); |
| 71 | 71 |
| 72 // Called by the session when the endpoint receives or sends a connection | 72 // Called by the session when the endpoint receives or sends a connection |
| 73 // close, and should immediately close the stream. | 73 // close, and should immediately close the stream. |
| 74 virtual void OnConnectionClosed(QuicErrorCode error, | 74 virtual void OnConnectionClosed(QuicErrorCode error, |
| 75 ConnectionCloseSource source); | 75 ConnectionCloseSource source); |
| 76 | 76 |
| 77 // Called by the stream subclass after it has consumed the final incoming | 77 // Called by the stream subclass after it has consumed the final incoming |
| 78 // data. | 78 // data. |
| 79 void OnFinRead(); | 79 virtual void OnFinRead(); |
| 80 | 80 |
| 81 // Called when new data is available from the sequencer. Subclasses must | 81 // Called when new data is available from the sequencer. Subclasses must |
| 82 // actively retrieve the data using the sequencer's Readv() or | 82 // actively retrieve the data using the sequencer's Readv() or |
| 83 // GetReadableRegions() method. | 83 // GetReadableRegions() method. |
| 84 virtual void OnDataAvailable() = 0; | 84 virtual void OnDataAvailable() = 0; |
| 85 | 85 |
| 86 // Called by the subclass or the sequencer to reset the stream from this | 86 // Called by the subclass or the sequencer to reset the stream from this |
| 87 // end. | 87 // end. |
| 88 virtual void Reset(QuicRstStreamErrorCode error); | 88 virtual void Reset(QuicRstStreamErrorCode error); |
| 89 | 89 |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 | 312 |
| 313 // For debugging only, used for busy loop check. | 313 // For debugging only, used for busy loop check. |
| 314 size_t busy_counter_; | 314 size_t busy_counter_; |
| 315 | 315 |
| 316 DISALLOW_COPY_AND_ASSIGN(ReliableQuicStream); | 316 DISALLOW_COPY_AND_ASSIGN(ReliableQuicStream); |
| 317 }; | 317 }; |
| 318 | 318 |
| 319 } // namespace net | 319 } // namespace net |
| 320 | 320 |
| 321 #endif // NET_QUIC_RELIABLE_QUIC_STREAM_H_ | 321 #endif // NET_QUIC_RELIABLE_QUIC_STREAM_H_ |
| OLD | NEW |