增加websocket支持
This commit is contained in:
@@ -19,8 +19,8 @@ namespace ylib
|
||||
std::regex regex;
|
||||
std::string pattern;
|
||||
std::string extra;
|
||||
std::function<void(network::http::request* request, network::http::response* response, const std::string& pattern, const std::string& extra)> callback;
|
||||
std::function<void(network::http::request* request, network::http::response* response)> callback2;
|
||||
std::function<void(network::http::request* request, network::http::response* response,network::http::websocket_message* ws_msg, const std::string& pattern, const std::string& extra)> callback;
|
||||
std::function<void(network::http::request* request, network::http::response* response,network::http::websocket_message* ws_msg)> callback2;
|
||||
};
|
||||
/******************************************************
|
||||
* class:订阅器
|
||||
@@ -30,7 +30,7 @@ namespace ylib
|
||||
public:
|
||||
subscribe();
|
||||
~subscribe();
|
||||
bool add(const std::string& pattern,const std::string& extra,std::function<void(network::http::request* request, network::http::response* response, const std::string& pattern, const std::string& extra)> callback);
|
||||
bool add(const std::string& pattern,const std::string& extra,std::function<void(network::http::request* request, network::http::response* response,network::http::websocket_message* ws_msg, const std::string& pattern, const std::string& extra)> callback);
|
||||
bool remove(const std::string& pattern);
|
||||
bool exist(const std::string& pattern);
|
||||
bool trigger(const std::string& url, network::http::reqpack* rp);
|
||||
|
||||
Reference in New Issue
Block a user