| 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 #ifndef NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_ | 5 #ifndef NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_ |
| 6 #define NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_ | 6 #define NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_ |
| 7 | 7 |
| 8 #include <sys/types.h> | 8 #include <sys/types.h> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 void OnFinRead() override; | 44 void OnFinRead() override; |
| 45 | 45 |
| 46 // Serializes the headers and body, sends it to the server, and | 46 // Serializes the headers and body, sends it to the server, and |
| 47 // returns the number of bytes sent. | 47 // returns the number of bytes sent. |
| 48 ssize_t SendRequest(const BalsaHeaders& headers, | 48 ssize_t SendRequest(const BalsaHeaders& headers, |
| 49 base::StringPiece body, | 49 base::StringPiece body, |
| 50 bool fin); | 50 bool fin); |
| 51 | 51 |
| 52 // Sends body data to the server, or buffers if it can't be sent immediately. | 52 // Sends body data to the server, or buffers if it can't be sent immediately. |
| 53 void SendBody(const std::string& data, bool fin); | 53 void SendBody(const std::string& data, bool fin); |
| 54 // As above, but |delegate| will be notified once |data| is ACKed. |
| 55 void SendBody(const std::string& data, |
| 56 bool fin, |
| 57 QuicAckNotifier::DelegateInterface* delegate); |
| 54 | 58 |
| 55 // Returns the response data. | 59 // Returns the response data. |
| 56 const std::string& data() { return data_; } | 60 const std::string& data() { return data_; } |
| 57 | 61 |
| 58 // Returns whatever headers have been received for this stream. | 62 // Returns whatever headers have been received for this stream. |
| 59 const BalsaHeaders& headers() { return headers_; } | 63 const BalsaHeaders& headers() { return headers_; } |
| 60 | 64 |
| 61 size_t header_bytes_read() const { return header_bytes_read_; } | 65 size_t header_bytes_read() const { return header_bytes_read_; } |
| 62 | 66 |
| 63 size_t header_bytes_written() const { return header_bytes_written_; } | 67 size_t header_bytes_written() const { return header_bytes_written_; } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 77 size_t header_bytes_read_; | 81 size_t header_bytes_read_; |
| 78 size_t header_bytes_written_; | 82 size_t header_bytes_written_; |
| 79 | 83 |
| 80 DISALLOW_COPY_AND_ASSIGN(QuicSpdyClientStream); | 84 DISALLOW_COPY_AND_ASSIGN(QuicSpdyClientStream); |
| 81 }; | 85 }; |
| 82 | 86 |
| 83 } // namespace tools | 87 } // namespace tools |
| 84 } // namespace net | 88 } // namespace net |
| 85 | 89 |
| 86 #endif // NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_ | 90 #endif // NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_ |
| OLD | NEW |