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_RELIABLE_CLIENT_STREAM_H_ | 5 #ifndef NET_TOOLS_QUIC_QUIC_RELIABLE_CLIENT_STREAM_H_ |
6 #define NET_TOOLS_QUIC_QUIC_RELIABLE_CLIENT_STREAM_H_ | 6 #define NET_TOOLS_QUIC_QUIC_RELIABLE_CLIENT_STREAM_H_ |
7 | 7 |
8 #include <sys/types.h> | 8 #include <sys/types.h> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 // response. | 42 // response. |
43 // SPDY/HTTP do not support bidirectional streaming. | 43 // SPDY/HTTP do not support bidirectional streaming. |
44 virtual bool OnStreamFrame(const QuicStreamFrame& frame) OVERRIDE; | 44 virtual bool OnStreamFrame(const QuicStreamFrame& frame) OVERRIDE; |
45 | 45 |
46 // Returns the response data. | 46 // Returns the response data. |
47 const std::string& data() { return data_; } | 47 const std::string& data() { return data_; } |
48 | 48 |
49 // Returns whatever headers have been received for this stream. | 49 // Returns whatever headers have been received for this stream. |
50 const BalsaHeaders& headers() { return headers_; } | 50 const BalsaHeaders& headers() { return headers_; } |
51 | 51 |
52 bool closed() { return closed_; } | |
53 | |
54 protected: | 52 protected: |
55 std::string* mutable_data() { return &data_; } | 53 std::string* mutable_data() { return &data_; } |
56 BalsaHeaders* mutable_headers() { return &headers_; } | 54 BalsaHeaders* mutable_headers() { return &headers_; } |
57 | 55 |
58 private: | 56 private: |
59 BalsaHeaders headers_; | 57 BalsaHeaders headers_; |
60 std::string data_; | 58 std::string data_; |
61 bool closed_; | |
62 | 59 |
63 DISALLOW_COPY_AND_ASSIGN(QuicReliableClientStream); | 60 DISALLOW_COPY_AND_ASSIGN(QuicReliableClientStream); |
64 }; | 61 }; |
65 | 62 |
66 } // namespace tools | 63 } // namespace tools |
67 } // namespace net | 64 } // namespace net |
68 | 65 |
69 #endif // NET_TOOLS_QUIC_QUIC_RELIABLE_CLIENT_STREAM_H_ | 66 #endif // NET_TOOLS_QUIC_QUIC_RELIABLE_CLIENT_STREAM_H_ |
OLD | NEW |