| 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_H_ | 5 #ifndef NET_HTTP_BIDIRECTIONAL_STREAM_H_ |
| 6 #define NET_HTTP_BIDIRECTIONAL_STREAM_H_ | 6 #define NET_HTTP_BIDIRECTIONAL_STREAM_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 // flag. | 147 // flag. |
| 148 void SendData(const scoped_refptr<IOBuffer>& data, | 148 void SendData(const scoped_refptr<IOBuffer>& data, |
| 149 int length, | 149 int length, |
| 150 bool end_stream); | 150 bool end_stream); |
| 151 | 151 |
| 152 // Same as SendData except this takes in a vector of IOBuffers. | 152 // Same as SendData except this takes in a vector of IOBuffers. |
| 153 void SendvData(const std::vector<scoped_refptr<IOBuffer>>& buffers, | 153 void SendvData(const std::vector<scoped_refptr<IOBuffer>>& buffers, |
| 154 const std::vector<int>& lengths, | 154 const std::vector<int>& lengths, |
| 155 bool end_stream); | 155 bool end_stream); |
| 156 | 156 |
| 157 // If |stream_request_| is non-NULL, cancel it. If |stream_impl_| is | |
| 158 // established, cancel it. No delegate method will be called after Cancel(). | |
| 159 // Any pending operations may or may not succeed. | |
| 160 void Cancel(); | |
| 161 | |
| 162 // Returns the protocol used by this stream. If stream has not been | 157 // Returns the protocol used by this stream. If stream has not been |
| 163 // established, return kProtoUnknown. | 158 // established, return kProtoUnknown. |
| 164 NextProto GetProtocol() const; | 159 NextProto GetProtocol() const; |
| 165 | 160 |
| 166 // Total number of bytes received over the network of SPDY data, headers, and | 161 // Total number of bytes received over the network of SPDY data, headers, and |
| 167 // push_promise frames associated with this stream, including the size of | 162 // push_promise frames associated with this stream, including the size of |
| 168 // frame headers, after SSL decryption and not including proxy overhead. | 163 // frame headers, after SSL decryption and not including proxy overhead. |
| 169 // If stream has not been established, return 0. | 164 // If stream has not been established, return 0. |
| 170 int64_t GetTotalReceivedBytes() const; | 165 int64_t GetTotalReceivedBytes() const; |
| 171 | 166 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 std::vector<int> write_buffer_len_list_; | 244 std::vector<int> write_buffer_len_list_; |
| 250 | 245 |
| 251 base::WeakPtrFactory<BidirectionalStream> weak_factory_; | 246 base::WeakPtrFactory<BidirectionalStream> weak_factory_; |
| 252 | 247 |
| 253 DISALLOW_COPY_AND_ASSIGN(BidirectionalStream); | 248 DISALLOW_COPY_AND_ASSIGN(BidirectionalStream); |
| 254 }; | 249 }; |
| 255 | 250 |
| 256 } // namespace net | 251 } // namespace net |
| 257 | 252 |
| 258 #endif // NET_HTTP_BIDIRECTIONAL_STREAM_H_ | 253 #endif // NET_HTTP_BIDIRECTIONAL_STREAM_H_ |
| OLD | NEW |