| 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> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 virtual void WaitForInitialResponse(); | 54 virtual void WaitForInitialResponse(); |
| 55 | 55 |
| 56 // Returns once a complete response or a connection close has been received | 56 // Returns once a complete response or a connection close has been received |
| 57 // from the server, or once the timeout expires. -1 for no timeout. | 57 // from the server, or once the timeout expires. -1 for no timeout. |
| 58 virtual void WaitForResponseForMs(int timeout_ms); | 58 virtual void WaitForResponseForMs(int timeout_ms); |
| 59 | 59 |
| 60 // Waits for some data or response from the server, or once the timeout | 60 // Waits for some data or response from the server, or once the timeout |
| 61 // expires. -1 for no timeout. | 61 // expires. -1 for no timeout. |
| 62 virtual void WaitForInitialResponseForMs(int timeout_ms); | 62 virtual void WaitForInitialResponseForMs(int timeout_ms); |
| 63 | 63 |
| 64 virtual void WaitUntil(int timeout_ms, std::function<bool()> trigger) = 0; | 64 virtual bool WaitUntil(int timeout_ms, std::function<bool()> trigger) = 0; |
| 65 | 65 |
| 66 // Clears any outstanding state from the last request. | 66 // Clears any outstanding state from the last request. |
| 67 virtual void ClearPerRequestState() = 0; | 67 virtual void ClearPerRequestState() = 0; |
| 68 | 68 |
| 69 // Closes and reopens the connection to the server. | 69 // Closes and reopens the connection to the server. |
| 70 virtual void ResetConnection() = 0; | 70 virtual void ResetConnection() = 0; |
| 71 | 71 |
| 72 // Closes the connection to the server. | 72 // Closes the connection to the server. |
| 73 virtual void Disconnect() = 0; | 73 virtual void Disconnect() = 0; |
| 74 | 74 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 | 156 |
| 157 // Instructs the client to populate response_body(). | 157 // Instructs the client to populate response_body(). |
| 158 virtual bool buffer_body() const = 0; | 158 virtual bool buffer_body() const = 0; |
| 159 virtual void set_buffer_body(bool buffer_body) = 0; | 159 virtual void set_buffer_body(bool buffer_body) = 0; |
| 160 }; | 160 }; |
| 161 | 161 |
| 162 } // namespace test | 162 } // namespace test |
| 163 } // namespace net | 163 } // namespace net |
| 164 | 164 |
| 165 #endif // NET_TOOLS_QUIC_TEST_TOOLS_SIMPLE_CLIENT_H_ | 165 #endif // NET_TOOLS_QUIC_TEST_TOOLS_SIMPLE_CLIENT_H_ |
| OLD | NEW |