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;
|
2018-08-27 08:07:36 +00:00
|
|
|
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
|
2018-08-27 08:07:36 +00:00
|
|
|
//list path definations here;
|
|
|
|
WS_PATH_ADD("/chat");
|
2018-08-22 07:08:48 +00:00
|
|
|
WS_PATH_LIST_END
|
|
|
|
};
|
|
|
|
}
|