2020-06-28 18:09:09 +00:00
|
|
|
#ifndef WF_TEST_UTIL_WS_SERVER2_HPP
|
|
|
|
#define WF_TEST_UTIL_WS_SERVER2_HPP
|
2020-06-13 12:59:58 +00:00
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
namespace webfuse_test
|
|
|
|
{
|
|
|
|
|
2020-06-30 15:34:05 +00:00
|
|
|
class InvokationHandler;
|
2020-06-13 12:59:58 +00:00
|
|
|
|
2020-06-29 18:21:55 +00:00
|
|
|
class WsServer
|
2020-06-13 12:59:58 +00:00
|
|
|
{
|
2020-06-29 18:21:55 +00:00
|
|
|
WsServer(WsServer const &) = delete;
|
|
|
|
WsServer & operator=(WsServer const & ) = delete;
|
2020-06-13 12:59:58 +00:00
|
|
|
public:
|
2020-06-29 18:21:55 +00:00
|
|
|
WsServer(
|
2020-06-30 15:34:05 +00:00
|
|
|
InvokationHandler& handler,
|
2020-06-13 12:59:58 +00:00
|
|
|
std::string const & protocol,
|
2020-06-14 17:35:50 +00:00
|
|
|
int port = 0,
|
|
|
|
bool enable_tls = false);
|
2020-06-29 18:21:55 +00:00
|
|
|
virtual ~WsServer();
|
2020-06-13 12:59:58 +00:00
|
|
|
std::string const & GetUrl() const;
|
2020-06-15 14:58:04 +00:00
|
|
|
void SendMessage(char const * message);
|
2020-06-13 12:59:58 +00:00
|
|
|
private:
|
|
|
|
class Private;
|
|
|
|
Private * d;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|