drogon/examples/simple_example/WebSocketTest.h

19 lines
646 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
{
class WebSocketTest:public drogon::WebSocketController<WebSocketTest>
{
public:
virtual void handleNewMessage(const WebSocketConnectionPtr&,
2018-08-23 10:05:17 +00:00
std::string &&)override;
virtual void handleConnectionClosed(const WebSocketConnectionPtr&)override;
virtual void handleNewConnection(const HttpRequestPtr &,const WebSocketConnectionPtr&)override;
2018-08-27 10:19:04 +00:00
WS_PATH_LIST_BEGIN
//list path definations here;
WS_PATH_ADD("/chat");
2018-08-22 07:08:48 +00:00
WS_PATH_LIST_END
};
}