2016-10-20 13:12:15 +00:00
|
|
|
#ifndef WEBSOCKET_H__
|
|
|
|
#define WEBSOCKET_H__
|
|
|
|
#include "Event.h"
|
|
|
|
namespace i2p
|
|
|
|
{
|
2016-11-01 14:26:40 +00:00
|
|
|
namespace event
|
|
|
|
{
|
2016-10-20 13:12:15 +00:00
|
|
|
|
2016-11-01 14:26:40 +00:00
|
|
|
class WebsocketServerImpl;
|
2018-01-06 03:48:51 +00:00
|
|
|
|
2016-11-01 14:26:40 +00:00
|
|
|
class WebsocketServer
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
WebsocketServer(const std::string & addr, int port);
|
|
|
|
~WebsocketServer();
|
2016-10-20 13:12:15 +00:00
|
|
|
|
2016-11-01 14:26:40 +00:00
|
|
|
void Start();
|
|
|
|
void Stop();
|
2016-10-20 13:12:15 +00:00
|
|
|
|
2016-11-01 14:26:40 +00:00
|
|
|
EventListener * ToListener();
|
2018-01-06 03:48:51 +00:00
|
|
|
|
2016-11-01 14:26:40 +00:00
|
|
|
private:
|
|
|
|
WebsocketServerImpl * m_impl;
|
|
|
|
};
|
2016-10-20 13:12:15 +00:00
|
|
|
|
2016-11-01 14:26:40 +00:00
|
|
|
}
|
2016-10-20 13:12:15 +00:00
|
|
|
}
|
|
|
|
#endif
|