| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_SPDY_SPDY_STREAM_H_ | 5 #ifndef NET_SPDY_SPDY_STREAM_H_ |
| 6 #define NET_SPDY_SPDY_STREAM_H_ | 6 #define NET_SPDY_SPDY_STREAM_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 // |result| is the number of bytes written or a net error code. | 180 // |result| is the number of bytes written or a net error code. |
| 181 void OnWriteComplete(int bytes); | 181 void OnWriteComplete(int bytes); |
| 182 | 182 |
| 183 // Called by the SpdySession when the request is finished. This callback | 183 // Called by the SpdySession when the request is finished. This callback |
| 184 // will always be called at the end of the request and signals to the | 184 // will always be called at the end of the request and signals to the |
| 185 // stream that the stream has no more network events. No further callbacks | 185 // stream that the stream has no more network events. No further callbacks |
| 186 // to the stream will be made after this call. | 186 // to the stream will be made after this call. |
| 187 // |status| is an error code or OK. | 187 // |status| is an error code or OK. |
| 188 void OnClose(int status); | 188 void OnClose(int status); |
| 189 | 189 |
| 190 // Close the stream. |
| 191 void Close(); |
| 190 void Cancel(); | 192 void Cancel(); |
| 191 bool cancelled() const { return cancelled_; } | 193 bool cancelled() const { return cancelled_; } |
| 192 bool closed() const { return io_state_ == STATE_DONE; } | 194 bool closed() const { return io_state_ == STATE_DONE; } |
| 193 | 195 |
| 194 // Interface for Spdy[Http|WebSocket]Stream to use. | 196 // Interface for Spdy[Http|WebSocket]Stream to use. |
| 195 | 197 |
| 196 // Sends the request. | 198 // Sends the request. |
| 197 // For non push stream, it will send SYN_STREAM frame. | 199 // For non push stream, it will send SYN_STREAM frame. |
| 198 int SendRequest(bool has_upload_data); | 200 int SendRequest(bool has_upload_data); |
| 199 | 201 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 int recv_bytes_; | 302 int recv_bytes_; |
| 301 // Data received before delegate is attached. | 303 // Data received before delegate is attached. |
| 302 std::vector<scoped_refptr<IOBufferWithSize> > pending_buffers_; | 304 std::vector<scoped_refptr<IOBufferWithSize> > pending_buffers_; |
| 303 | 305 |
| 304 DISALLOW_COPY_AND_ASSIGN(SpdyStream); | 306 DISALLOW_COPY_AND_ASSIGN(SpdyStream); |
| 305 }; | 307 }; |
| 306 | 308 |
| 307 } // namespace net | 309 } // namespace net |
| 308 | 310 |
| 309 #endif // NET_SPDY_SPDY_STREAM_H_ | 311 #endif // NET_SPDY_SPDY_STREAM_H_ |
| OLD | NEW |