OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_HTTP_BIDIRECTIONAL_STREAM_IMPL_H_ | 5 #ifndef NET_HTTP_BIDIRECTIONAL_STREAM_IMPL_H_ |
6 #define NET_HTTP_BIDIRECTIONAL_STREAM_IMPL_H_ | 6 #define NET_HTTP_BIDIRECTIONAL_STREAM_IMPL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
67 // The delegate should not call BidirectionalStreamImpl::Cancel | 67 // The delegate should not call BidirectionalStreamImpl::Cancel |
68 // during this callback. | 68 // during this callback. |
69 virtual void OnDataSent() = 0; | 69 virtual void OnDataSent() = 0; |
70 | 70 |
71 // Called when trailers are received. This is called as soon as trailers | 71 // Called when trailers are received. This is called as soon as trailers |
72 // are received, which can happen before a read completes. | 72 // are received, which can happen before a read completes. |
73 // The delegate is able to continue reading if there is no pending read and | 73 // The delegate is able to continue reading if there is no pending read and |
74 // EOF has not been received, or to send data if there is no pending send. | 74 // EOF has not been received, or to send data if there is no pending send. |
75 virtual void OnTrailersReceived(const SpdyHeaderBlock& trailers) = 0; | 75 virtual void OnTrailersReceived(const SpdyHeaderBlock& trailers) = 0; |
76 | 76 |
77 // Called when an error occurred. | 77 // Called when an error occurred. Do not cal into the stream after this |
mef
2016/06/01 21:53:15
cal -> call.
xunjieli
2016/06/01 23:08:22
Done.
| |
78 // No other delegate functions will be called after this. | 78 // point. |
79 virtual void OnFailed(int status) = 0; | 79 virtual void OnFailed(int status) = 0; |
80 | 80 |
81 protected: | 81 protected: |
82 virtual ~Delegate(); | 82 virtual ~Delegate(); |
83 | 83 |
84 private: | 84 private: |
85 DISALLOW_COPY_AND_ASSIGN(Delegate); | 85 DISALLOW_COPY_AND_ASSIGN(Delegate); |
86 }; | 86 }; |
87 | 87 |
88 BidirectionalStreamImpl(); | 88 BidirectionalStreamImpl(); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
152 // not associated with any stream, and are not included in this value. | 152 // not associated with any stream, and are not included in this value. |
153 virtual int64_t GetTotalSentBytes() const = 0; | 153 virtual int64_t GetTotalSentBytes() const = 0; |
154 | 154 |
155 private: | 155 private: |
156 DISALLOW_COPY_AND_ASSIGN(BidirectionalStreamImpl); | 156 DISALLOW_COPY_AND_ASSIGN(BidirectionalStreamImpl); |
157 }; | 157 }; |
158 | 158 |
159 } // namespace net | 159 } // namespace net |
160 | 160 |
161 #endif // NET_HTTP_BIDIRECTIONAL_STREAM_IMPL_H_ | 161 #endif // NET_HTTP_BIDIRECTIONAL_STREAM_IMPL_H_ |
OLD | NEW |