1
0
mirror of https://github.com/falk-werner/webfuse synced 2024-10-27 20:34:10 +00:00
falk-werner_webfuse/test/webfuse/test_util/ws_client.hpp
2020-06-30 20:50:39 +02:00

31 lines
609 B
C++

#ifndef WF_TEST_UTIL_WS_CLIENT_HPP
#define WF_TEST_UTIL_WS_CLIENT_HPP
#include <string>
#include <future>
namespace webfuse_test
{
class InvokationHandler;
class WsClient
{
WsClient(WsClient const &) = delete;
WsClient & operator=(WsClient const &) = delete;
public:
WsClient(
InvokationHandler& handler,
std::string const & protocol);
virtual ~WsClient();
std::future<void> Connect(int port, std::string const & protocol, bool use_tls = true);
std::future<std::string> Invoke(std::string const & message);
private:
class Private;
Private *d;
};
}
#endif