diff --git a/server/WebApi.cpp b/server/WebApi.cpp index cc98d596..80de4984 100644 --- a/server/WebApi.cpp +++ b/server/WebApi.cpp @@ -779,6 +779,14 @@ void installWebApi() { val["hit"] = (int)s_rtpServerMap.erase(allArgs["port"].as()); }); + api_regist1("/index/api/listRtpServer",[](API_ARGS1){ + CHECK_SECRET(); + + lock_guard lck(s_rtpServerMapMtx); + for(auto &pr : s_rtpServerMap){ + val["data"].append(pr.first); + } + }); #endif//ENABLE_RTPPROXY