#include #include #include #include #include #include "perfjson.h" #include "fstop.h" int main(int argc, char *argv[]) { QCoreApplication app{argc, argv}; auto tcpServer = std::make_unique(); QHttpServer server; if (!tcpServer->listen(QHostAddress::LocalHost, 8000)) { qFatal("could not listen: %s", qPrintable(tcpServer->errorString())); return -1; } if (!server.bind(tcpServer.get())) { qFatal("could not bind webserver to socket"); return -2; } tcpServer.release(); // QHttpServer now owns QTcpServer PerfJson perfJson{server}; FsTop fsTop{server}; return app.exec(); }