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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 virtual void OnClose(); | 66 virtual void OnClose(); |
67 | 67 |
68 // Called by the session when the endpoint receives a RST_STREAM from the | 68 // Called by the session when the endpoint receives a RST_STREAM from the |
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, bool from_peer); | 74 virtual void OnConnectionClosed(QuicErrorCode error, bool from_peer); |
75 | 75 |
76 // Called by the sequencer after ProcessRawData has accepted the final | 76 // Called by the stream subclass after it has consumed the final incoming |
77 // incoming data. | 77 // data. |
78 virtual void OnFinRead(); | 78 void OnFinRead(); |
79 | 79 |
80 // Called when new data is available from the sequencer. Subclasses must | 80 // Called when new data is available from the sequencer. Subclasses must |
81 // actively retrieve the data using the sequencer's Readv() or | 81 // actively retrieve the data using the sequencer's Readv() or |
82 // GetReadableRegions() method. | 82 // GetReadableRegions() method. |
83 virtual void OnDataAvailable() = 0; | 83 virtual void OnDataAvailable() = 0; |
84 | 84 |
85 // Called by the subclass or the sequencer to reset the stream from this | 85 // Called by the subclass or the sequencer to reset the stream from this |
86 // end. | 86 // end. |
87 virtual void Reset(QuicRstStreamErrorCode error); | 87 virtual void Reset(QuicRstStreamErrorCode error); |
88 | 88 |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 // connection level flow control limits (but are stream level flow control | 284 // connection level flow control limits (but are stream level flow control |
285 // limited). | 285 // limited). |
286 bool stream_contributes_to_connection_flow_control_; | 286 bool stream_contributes_to_connection_flow_control_; |
287 | 287 |
288 DISALLOW_COPY_AND_ASSIGN(ReliableQuicStream); | 288 DISALLOW_COPY_AND_ASSIGN(ReliableQuicStream); |
289 }; | 289 }; |
290 | 290 |
291 } // namespace net | 291 } // namespace net |
292 | 292 |
293 #endif // NET_QUIC_RELIABLE_QUIC_STREAM_H_ | 293 #endif // NET_QUIC_RELIABLE_QUIC_STREAM_H_ |
OLD | NEW |