mirror of
https://gitee.com/an-tao/drogon.git
synced 2024-11-30 02:37:57 +08:00
Format code
This commit is contained in:
parent
8788d0359d
commit
a314404e89
@ -7,12 +7,12 @@ namespace example{
|
||||
public:
|
||||
virtual void asyncHandleHttpRequest(const HttpRequestPtr& req,const std::function<void (const HttpResponsePtr &)>&callback)override;
|
||||
PATH_LIST_BEGIN
|
||||
//list path definations here;
|
||||
//PATH_ADD("/path","filter1","filter2",...);
|
||||
PATH_ADD("/");
|
||||
PATH_ADD("/Test","nonFilter");
|
||||
PATH_ADD("/tpost","drogon::PostFilter");
|
||||
PATH_ADD("/slow","TimeFilter");
|
||||
//list path definations here;
|
||||
//PATH_ADD("/path","filter1","filter2",...);
|
||||
PATH_ADD("/");
|
||||
PATH_ADD("/Test","nonFilter");
|
||||
PATH_ADD("/tpost","drogon::PostFilter");
|
||||
PATH_ADD("/slow","TimeFilter");
|
||||
PATH_LIST_END
|
||||
};
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ namespace example
|
||||
std::string &&)override;
|
||||
virtual void handleConnectionClosed(const WebSocketConnectionPtr&)override;
|
||||
virtual void handleNewConnection(const HttpRequestPtr &,const WebSocketConnectionPtr&)override;
|
||||
WS_PATH_LIST_BEGIN
|
||||
WS_PATH_LIST_BEGIN
|
||||
//list path definations here;
|
||||
WS_PATH_ADD("/chat");
|
||||
WS_PATH_LIST_END
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
#define PATH_LIST_BEGIN public:\
|
||||
#define PATH_LIST_BEGIN \
|
||||
static std::vector<std::pair<std::string,std::vector<std::string>>> paths() \
|
||||
{\
|
||||
std::vector<std::pair<std::string,std::vector<std::string>>> vet;
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
#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() \
|
||||
{\
|
||||
std::vector<std::pair<std::string,std::vector<std::string>>> vet;
|
||||
|
Loading…
Reference in New Issue
Block a user