| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <sys/types.h> | 9 #include <sys/types.h> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 void OnPromiseHeaderList(QuicStreamId promised_id, | 52 void OnPromiseHeaderList(QuicStreamId promised_id, |
| 53 size_t frame_len, | 53 size_t frame_len, |
| 54 const QuicHeaderList& header_list) override; | 54 const QuicHeaderList& header_list) override; |
| 55 | 55 |
| 56 // ReliableQuicStream implementation called by the session when there's | 56 // ReliableQuicStream implementation called by the session when there's |
| 57 // data for us. | 57 // data for us. |
| 58 void OnDataAvailable() override; | 58 void OnDataAvailable() override; |
| 59 | 59 |
| 60 // Serializes the headers and body, sends it to the server, and | 60 // Serializes the headers and body, sends it to the server, and |
| 61 // returns the number of bytes sent. | 61 // returns the number of bytes sent. |
| 62 size_t SendRequest(const SpdyHeaderBlock& headers, | 62 size_t SendRequest(SpdyHeaderBlock headers, base::StringPiece body, bool fin); |
| 63 base::StringPiece body, | |
| 64 bool fin); | |
| 65 | 63 |
| 66 // Returns the response data. | 64 // Returns the response data. |
| 67 const std::string& data() { return data_; } | 65 const std::string& data() { return data_; } |
| 68 | 66 |
| 69 // Returns whatever headers have been received for this stream. | 67 // Returns whatever headers have been received for this stream. |
| 70 const SpdyHeaderBlock& response_headers() { return response_headers_; } | 68 const SpdyHeaderBlock& response_headers() { return response_headers_; } |
| 71 | 69 |
| 72 size_t header_bytes_read() const { return header_bytes_read_; } | 70 size_t header_bytes_read() const { return header_bytes_read_; } |
| 73 | 71 |
| 74 size_t header_bytes_written() const { return header_bytes_written_; } | 72 size_t header_bytes_written() const { return header_bytes_written_; } |
| (...skipping 27 matching lines...) Expand all Loading... |
| 102 bool allow_bidirectional_data_; | 100 bool allow_bidirectional_data_; |
| 103 | 101 |
| 104 QuicClientSession* session_; | 102 QuicClientSession* session_; |
| 105 | 103 |
| 106 DISALLOW_COPY_AND_ASSIGN(QuicSpdyClientStream); | 104 DISALLOW_COPY_AND_ASSIGN(QuicSpdyClientStream); |
| 107 }; | 105 }; |
| 108 | 106 |
| 109 } // namespace net | 107 } // namespace net |
| 110 | 108 |
| 111 #endif // NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_ | 109 #endif // NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_ |
| OLD | NEW |