| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 size_t header_bytes_written() const { return header_bytes_written_; } | 72 size_t header_bytes_written() const { return header_bytes_written_; } |
| 73 | 73 |
| 74 size_t trailer_bytes_read() const { return header_bytes_read_; } | 74 size_t trailer_bytes_read() const { return header_bytes_read_; } |
| 75 | 75 |
| 76 int response_code() const { return response_code_; } | 76 int response_code() const { return response_code_; } |
| 77 | 77 |
| 78 // While the server's SetPriority shouldn't be called externally, the creator | 78 // While the server's SetPriority shouldn't be called externally, the creator |
| 79 // of client-side streams should be able to set the priority. | 79 // of client-side streams should be able to set the priority. |
| 80 using QuicSpdyStream::SetPriority; | 80 using QuicSpdyStream::SetPriority; |
| 81 | 81 |
| 82 void set_allow_bidirectional_data(bool value) { | |
| 83 allow_bidirectional_data_ = value; | |
| 84 } | |
| 85 | |
| 86 bool allow_bidirectional_data() const { return allow_bidirectional_data_; } | |
| 87 | |
| 88 private: | 82 private: |
| 89 // The parsed headers received from the server. | 83 // The parsed headers received from the server. |
| 90 SpdyHeaderBlock response_headers_; | 84 SpdyHeaderBlock response_headers_; |
| 91 | 85 |
| 92 // The parsed content-length, or -1 if none is specified. | 86 // The parsed content-length, or -1 if none is specified. |
| 93 int64_t content_length_; | 87 int64_t content_length_; |
| 94 int response_code_; | 88 int response_code_; |
| 95 std::string data_; | 89 std::string data_; |
| 96 size_t header_bytes_read_; | 90 size_t header_bytes_read_; |
| 97 size_t header_bytes_written_; | 91 size_t header_bytes_written_; |
| 98 // When true allows the sending of a request to continue while the response is | |
| 99 // arriving. | |
| 100 bool allow_bidirectional_data_; | |
| 101 | 92 |
| 102 QuicClientSession* session_; | 93 QuicClientSession* session_; |
| 103 | 94 |
| 104 DISALLOW_COPY_AND_ASSIGN(QuicSpdyClientStream); | 95 DISALLOW_COPY_AND_ASSIGN(QuicSpdyClientStream); |
| 105 }; | 96 }; |
| 106 | 97 |
| 107 } // namespace net | 98 } // namespace net |
| 108 | 99 |
| 109 #endif // NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_ | 100 #endif // NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_ |
| OLD | NEW |