if(::arg().mustDo("experimental-json-interface")) {
L<<Logger::Warning << "Enabling JSON interface" << endl;
try {
- new JWebserver(t_fdm);
+ new RecursorWebServer(t_fdm);
}
catch(PDNSException &e) {
L<<Logger::Error<<"Exception: "<<e.reason<<endl;
using namespace rapidjson;
-JWebserver::JWebserver(FDMultiplexer* fdm)
+RecursorWebServer::RecursorWebServer(FDMultiplexer* fdm)
{
RecursorControlParser rcp; // inits
d_ws = new AsyncWebServer(fdm, arg()["webserver-address"], arg().asNum("webserver-port"), arg()["webserver-password"]);
// legacy dispatch
- d_ws->registerApiHandler("/jsonstat", boost::bind(&JWebserver::jsonstat, this, _1, _2));
+ d_ws->registerApiHandler("/jsonstat", boost::bind(&RecursorWebServer::jsonstat, this, _1, _2));
d_ws->go();
}
-void JWebserver::jsonstat(HttpRequest* req, HttpResponse *resp)
+void RecursorWebServer::jsonstat(HttpRequest* req, HttpResponse *resp)
{
string command;
#include "mplexer.hh"
#include "webserver.hh"
-class JWebserver : public boost::noncopyable
+class RecursorWebServer : public boost::noncopyable
{
public:
- explicit JWebserver(FDMultiplexer* fdm);
+ explicit RecursorWebServer(FDMultiplexer* fdm);
void jsonstat(HttpRequest* req, HttpResponse *resp);
private: