MCPcopy Create free account
hub / github.com/RGAA-Software/GoDesk / AddHttpRouter

Method AddHttpRouter

src/render/plugins/net_ws/ws_server.cpp:292–298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

290 }
291
292 void WsPluginServer::AddHttpRouter(const std::string &path,
293 std::function<void(const std::string& path, std::shared_ptr<asio2::http_session> &session_ptr, http::web_request& req, http::web_response& rep)>&& callback) {
294 // bind it
295 server_->bind<http::verb::get, http::verb::post>(path, [=, this](std::shared_ptr<asio2::http_session> &session_ptr, http::web_request &req, http::web_response &rep) {
296 callback(path, session_ptr, req, rep);
297 }, aop_log{}); //, http::enable_cache
298 }
299
300 void WsPluginServer::NotifyMediaClientConnected(const std::string& conn_id, const std::string& stream_id, const std::string& visitor_device_id) {
301 auto event = std::make_shared<GrPluginClientConnectedEvent>();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected