Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Side by Side Diff: net/quic/quartc/quartc_stream_interface.h

Issue 2913413002: Groundwork for cancelling quartc streams after a deadline is exceeded. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/quartc/quartc_stream.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2017 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2017 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 #ifndef NET_QUIC_QUARTC_QUARTC_STREAM_INTERFACE_H_ 5 #ifndef NET_QUIC_QUARTC_QUARTC_STREAM_INTERFACE_H_
6 #define NET_QUIC_QUARTC_QUARTC_STREAM_INTERFACE_H_ 6 #define NET_QUIC_QUARTC_QUARTC_STREAM_INTERFACE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 10 matching lines...) Expand all
21 // The QUIC stream ID. 21 // The QUIC stream ID.
22 virtual uint32_t stream_id() = 0; 22 virtual uint32_t stream_id() = 0;
23 23
24 // The amount of data buffered by the QuicConnection. 24 // The amount of data buffered by the QuicConnection.
25 virtual uint64_t buffered_amount() = 0; 25 virtual uint64_t buffered_amount() = 0;
26 26
27 // Return true if the FIN has been sent. Used by the outgoing streams to 27 // Return true if the FIN has been sent. Used by the outgoing streams to
28 // determine if all the data has been sent 28 // determine if all the data has been sent
29 virtual bool fin_sent() = 0; 29 virtual bool fin_sent() = 0;
30 30
31 virtual int stream_error() = 0;
32
33 virtual int connection_error() = 0;
34
31 struct WriteParameters { 35 struct WriteParameters {
32 WriteParameters() : fin(false) {} 36 WriteParameters() : fin(false) {}
33 // |fin| is set to be true when there is no more data need to be send 37 // |fin| is set to be true when there is no more data need to be send
34 // through a particular stream. The receiving side will used it to determine 38 // through a particular stream. The receiving side will used it to determine
35 // if the sender finish sending data. 39 // if the sender finish sending data.
36 bool fin; 40 bool fin;
37 }; 41 };
38 42
39 // Sends data reliably and in-order, buffering if necessary until Close() is 43 // Sends data reliably and in-order, buffering if necessary until Close() is
40 // called. 44 // called.
(...skipping 13 matching lines...) Expand all
54 58
55 // Called when the stream receives the date. 59 // Called when the stream receives the date.
56 virtual void OnReceived(QuartcStreamInterface* stream, 60 virtual void OnReceived(QuartcStreamInterface* stream,
57 const char* data, 61 const char* data,
58 size_t size) = 0; 62 size_t size) = 0;
59 63
60 // Called when the stream is closed, either locally or by the remote 64 // Called when the stream is closed, either locally or by the remote
61 // endpoint. 65 // endpoint.
62 // TODO(zhihuang) Creates a map from the integer error_code to WebRTC native 66 // TODO(zhihuang) Creates a map from the integer error_code to WebRTC native
63 // error code. 67 // error code.
64 virtual void OnClose(QuartcStreamInterface* stream, int error_code) = 0; 68 virtual void OnClose(QuartcStreamInterface* stream) = 0;
65 69
66 // Called when buffered_amount() decreases. 70 // Called when buffered_amount() decreases.
67 virtual void OnBufferedAmountDecrease(QuartcStreamInterface* stream) = 0; 71 virtual void OnBufferedAmountDecrease(QuartcStreamInterface* stream) = 0;
68 }; 72 };
69 73
70 // The |delegate| is not owned by QuartcStream. 74 // The |delegate| is not owned by QuartcStream.
71 virtual void SetDelegate(Delegate* delegate) = 0; 75 virtual void SetDelegate(Delegate* delegate) = 0;
72 }; 76 };
73 77
74 } // namespace net 78 } // namespace net
75 79
76 #endif // NET_QUIC_QUARTC_QUARTC_STREAM_INTERFACE_H_ 80 #endif // NET_QUIC_QUARTC_QUARTC_STREAM_INTERFACE_H_
OLDNEW
« no previous file with comments | « net/quic/quartc/quartc_stream.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698