OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_TEST_TOOLS_SIMPLE_CLIENT_H_ | 5 #ifndef NET_TOOLS_QUIC_TEST_TOOLS_SIMPLE_CLIENT_H_ |
6 #define NET_TOOLS_QUIC_TEST_TOOLS_SIMPLE_CLIENT_H_ | 6 #define NET_TOOLS_QUIC_TEST_TOOLS_SIMPLE_CLIENT_H_ |
7 | 7 |
| 8 #include <stddef.h> |
| 9 #include <stdint.h> |
| 10 |
8 #include <string> | 11 #include <string> |
9 #include <vector> | 12 #include <vector> |
10 | 13 |
11 #include "net/base/ip_endpoint.h" | 14 #include "net/base/ip_endpoint.h" |
12 #include "net/tools/balsa/balsa_frame.h" | 15 #include "net/tools/balsa/balsa_frame.h" |
13 | 16 |
14 namespace net { | 17 namespace net { |
15 namespace tools { | 18 namespace tools { |
16 namespace test { | 19 namespace test { |
17 | 20 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 virtual bool response_headers_complete() const = 0; | 111 virtual bool response_headers_complete() const = 0; |
109 | 112 |
110 // Returns the response headers, if a response was completely framed. | 113 // Returns the response headers, if a response was completely framed. |
111 // Undefined behavior otherwise. | 114 // Undefined behavior otherwise. |
112 virtual const BalsaHeaders* response_headers() const = 0; | 115 virtual const BalsaHeaders* response_headers() const = 0; |
113 | 116 |
114 // Returns true iff response has been fully received. | 117 // Returns true iff response has been fully received. |
115 virtual bool response_complete() const = 0; | 118 virtual bool response_complete() const = 0; |
116 | 119 |
117 // Returns the number of bytes read from the server during this request. | 120 // Returns the number of bytes read from the server during this request. |
118 virtual int64 response_size() const = 0; | 121 virtual int64_t response_size() const = 0; |
119 | 122 |
120 // Returns the number of header bytes received during this request, if | 123 // Returns the number of header bytes received during this request, if |
121 // meaningful for the protocol. | 124 // meaningful for the protocol. |
122 virtual int response_header_size() const; | 125 virtual int response_header_size() const; |
123 | 126 |
124 // Returns the number of body bytes received during this request, if | 127 // Returns the number of body bytes received during this request, if |
125 // meaningful for the protocol. | 128 // meaningful for the protocol. |
126 virtual int64 response_body_size() const; | 129 virtual int64_t response_body_size() const; |
127 | 130 |
128 // Returns the response body, if there was one. If there was no response, or | 131 // Returns the response body, if there was one. If there was no response, or |
129 // if buffer_body() is false, returns an empty string. | 132 // if buffer_body() is false, returns an empty string. |
130 virtual const std::string& response_body() = 0; | 133 virtual const std::string& response_body() = 0; |
131 | 134 |
132 // The address the client is connected to. | 135 // The address the client is connected to. |
133 virtual const IPEndPoint& address() const = 0; | 136 virtual const IPEndPoint& address() const = 0; |
134 | 137 |
135 // Returns true if the client is connected, false otherwise. | 138 // Returns true if the client is connected, false otherwise. |
136 virtual bool connected() const = 0; | 139 virtual bool connected() const = 0; |
(...skipping 15 matching lines...) Expand all Loading... |
152 // Instructs the client to populate response_body(). | 155 // Instructs the client to populate response_body(). |
153 virtual bool buffer_body() const = 0; | 156 virtual bool buffer_body() const = 0; |
154 virtual void set_buffer_body(bool buffer_body) = 0; | 157 virtual void set_buffer_body(bool buffer_body) = 0; |
155 }; | 158 }; |
156 | 159 |
157 } // namespace test | 160 } // namespace test |
158 } // namespace tools | 161 } // namespace tools |
159 } // namespace net | 162 } // namespace net |
160 | 163 |
161 #endif // NET_TOOLS_QUIC_TEST_TOOLS_SIMPLE_CLIENT_H_ | 164 #endif // NET_TOOLS_QUIC_TEST_TOOLS_SIMPLE_CLIENT_H_ |
OLD | NEW |