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 #ifndef NET_QUIC_RELIABLE_QUIC_STREAM_H_ | 7 #ifndef NET_QUIC_RELIABLE_QUIC_STREAM_H_ |
8 #define NET_QUIC_RELIABLE_QUIC_STREAM_H_ | 8 #define NET_QUIC_RELIABLE_QUIC_STREAM_H_ |
9 | 9 |
10 #include <sys/types.h> | 10 #include <sys/types.h> |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 virtual bool OnStreamFrame(const QuicStreamFrame& frame); | 44 virtual bool OnStreamFrame(const QuicStreamFrame& frame); |
45 | 45 |
46 // Called when the connection becomes writeable to allow the stream | 46 // Called when the connection becomes writeable to allow the stream |
47 // to write any pending data. | 47 // to write any pending data. |
48 virtual void OnCanWrite(); | 48 virtual void OnCanWrite(); |
49 | 49 |
50 // Called by the session just before the stream is deleted. | 50 // Called by the session just before the stream is deleted. |
51 virtual void OnClose(); | 51 virtual void OnClose(); |
52 | 52 |
53 // Called when we get a stream reset from the peer. | 53 // Called when we get a stream reset from the peer. |
54 virtual void OnStreamReset(QuicRstStreamErrorCode error); | 54 virtual void OnStreamReset(const QuicRstStreamFrame& frame); |
55 | 55 |
56 // Called when we get or send a connection close, and should immediately | 56 // Called when we get or send a connection close, and should immediately |
57 // close the stream. This is not passed through the sequencer, | 57 // close the stream. This is not passed through the sequencer, |
58 // but is handled immediately. | 58 // but is handled immediately. |
59 virtual void OnConnectionClosed(QuicErrorCode error, bool from_peer); | 59 virtual void OnConnectionClosed(QuicErrorCode error, bool from_peer); |
60 | 60 |
61 // Called when the final data has been read. | 61 // Called when the final data has been read. |
62 virtual void OnFinRead(); | 62 virtual void OnFinRead(); |
63 | 63 |
64 virtual uint32 ProcessRawData(const char* data, uint32 data_len) = 0; | 64 virtual uint32 ProcessRawData(const char* data, uint32 data_len) = 0; |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 | 151 |
152 // True if the session this stream is running under is a server session. | 152 // True if the session this stream is running under is a server session. |
153 bool is_server_; | 153 bool is_server_; |
154 | 154 |
155 DISALLOW_COPY_AND_ASSIGN(ReliableQuicStream); | 155 DISALLOW_COPY_AND_ASSIGN(ReliableQuicStream); |
156 }; | 156 }; |
157 | 157 |
158 } // namespace net | 158 } // namespace net |
159 | 159 |
160 #endif // NET_QUIC_RELIABLE_QUIC_STREAM_H_ | 160 #endif // NET_QUIC_RELIABLE_QUIC_STREAM_H_ |
OLD | NEW |