Format code
This commit is contained in:
parent
8788d0359d
commit
a314404e89
|
@ -7,12 +7,12 @@ namespace example{
|
||||||
public:
|
public:
|
||||||
virtual void asyncHandleHttpRequest(const HttpRequestPtr& req,const std::function<void (const HttpResponsePtr &)>&callback)override;
|
virtual void asyncHandleHttpRequest(const HttpRequestPtr& req,const std::function<void (const HttpResponsePtr &)>&callback)override;
|
||||||
PATH_LIST_BEGIN
|
PATH_LIST_BEGIN
|
||||||
//list path definations here;
|
//list path definations here;
|
||||||
//PATH_ADD("/path","filter1","filter2",...);
|
//PATH_ADD("/path","filter1","filter2",...);
|
||||||
PATH_ADD("/");
|
PATH_ADD("/");
|
||||||
PATH_ADD("/Test","nonFilter");
|
PATH_ADD("/Test","nonFilter");
|
||||||
PATH_ADD("/tpost","drogon::PostFilter");
|
PATH_ADD("/tpost","drogon::PostFilter");
|
||||||
PATH_ADD("/slow","TimeFilter");
|
PATH_ADD("/slow","TimeFilter");
|
||||||
PATH_LIST_END
|
PATH_LIST_END
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ namespace example
|
||||||
std::string &&)override;
|
std::string &&)override;
|
||||||
virtual void handleConnectionClosed(const WebSocketConnectionPtr&)override;
|
virtual void handleConnectionClosed(const WebSocketConnectionPtr&)override;
|
||||||
virtual void handleNewConnection(const HttpRequestPtr &,const WebSocketConnectionPtr&)override;
|
virtual void handleNewConnection(const HttpRequestPtr &,const WebSocketConnectionPtr&)override;
|
||||||
WS_PATH_LIST_BEGIN
|
WS_PATH_LIST_BEGIN
|
||||||
//list path definations here;
|
//list path definations here;
|
||||||
WS_PATH_ADD("/chat");
|
WS_PATH_ADD("/chat");
|
||||||
WS_PATH_LIST_END
|
WS_PATH_LIST_END
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#define PATH_LIST_BEGIN public:\
|
#define PATH_LIST_BEGIN \
|
||||||
static std::vector<std::pair<std::string,std::vector<std::string>>> paths() \
|
static std::vector<std::pair<std::string,std::vector<std::string>>> paths() \
|
||||||
{\
|
{\
|
||||||
std::vector<std::pair<std::string,std::vector<std::string>>> vet;
|
std::vector<std::pair<std::string,std::vector<std::string>>> vet;
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#define WS_PATH_LIST_BEGIN public:\
|
#define WS_PATH_LIST_BEGIN \
|
||||||
static std::vector<std::pair<std::string,std::vector<std::string>>> paths() \
|
static std::vector<std::pair<std::string,std::vector<std::string>>> paths() \
|
||||||
{\
|
{\
|
||||||
std::vector<std::pair<std::string,std::vector<std::string>>> vet;
|
std::vector<std::pair<std::string,std::vector<std::string>>> vet;
|
||||||
|
|
Loading…
Reference in New Issue