1
0
mirror of https://github.com/falk-werner/webfuse synced 2024-10-27 20:34:10 +00:00
falk-werner_webfuse/src/webfuse/ws/client.hpp

34 lines
643 B
C++
Raw Normal View History

#ifndef WEBFUSE_WSCLIENT_HPP
#define WEBFUSE_WSCLIENT_HPP
#include "webfuse/ws/messagewriter.hpp"
#include "webfuse/ws/messagereader.hpp"
#include <functional>
namespace webfuse
{
using ws_client_handler = std::function<messagewriter (messagereader & reader)>;
class ws_client
{
ws_client(ws_client const &) = delete;
ws_client& operator=(ws_client const &) = delete;
public:
ws_client(ws_client_handler handler);
~ws_client();
ws_client(ws_client && other);
ws_client& operator=(ws_client && other);
void connect(std::string url);
void service();
private:
class detail;
detail * d;
};
}
#endif