drogon/examples/simple_example/WebSocketTest.h

22 lines
734 B
C
Raw Normal View History

2018-08-22 07:08:48 +00:00
#pragma once
#include <drogon/WebSocketController.h>
using namespace drogon;
namespace example
{
2018-10-14 07:56:54 +00:00
class WebSocketTest : public drogon::WebSocketController<WebSocketTest>
{
public:
virtual void handleNewMessage(const WebSocketConnectionPtr &,
2019-04-06 15:06:38 +00:00
std::string &&,
const WebSocketMessageType &) override;
2019-05-18 12:39:57 +00:00
virtual void handleConnectionClosed(
const WebSocketConnectionPtr &) override;
virtual void handleNewConnection(const HttpRequestPtr &,
const WebSocketConnectionPtr &) override;
2018-10-14 07:56:54 +00:00
WS_PATH_LIST_BEGIN
2019-05-18 12:39:57 +00:00
// list path definations here;
2018-10-14 07:56:54 +00:00
WS_PATH_ADD("/chat");
WS_PATH_LIST_END
};
2019-05-18 12:39:57 +00:00
} // namespace example