2022-09-13 02:30:51 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <drogon/WebSocketController.h>
|
|
|
|
|
|
|
|
using namespace drogon;
|
|
|
|
|
|
|
|
class WsClient : public drogon::WebSocketController<WsClient>
|
|
|
|
{
|
|
|
|
public:
|
2024-01-31 03:21:18 +00:00
|
|
|
void handleNewMessage(const WebSocketConnectionPtr &,
|
|
|
|
std::string &&,
|
|
|
|
const WebSocketMessageType &) override;
|
|
|
|
void handleNewConnection(const HttpRequestPtr &,
|
|
|
|
const WebSocketConnectionPtr &) override;
|
|
|
|
void handleConnectionClosed(const WebSocketConnectionPtr &) override;
|
2022-09-13 02:30:51 +00:00
|
|
|
WS_PATH_LIST_BEGIN
|
|
|
|
WS_PATH_ADD("/sub");
|
|
|
|
WS_PATH_ADD("/pub");
|
|
|
|
WS_PATH_LIST_END
|
|
|
|
};
|