1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
#include <QCoreApplication>
#include <qxtwebcgiservice.h>
#include <QxtHttpSessionManager>
#include <QtDebug>
#ifdef Q_OS_WIN
# define CLIENT_NAME "\\cgiclient.exe"
#else
# define CLIENT_NAME "/cgiclient"
#endif
int main(int argc, char** argv) {
QCoreApplication app(argc, argv);
QxtHttpSessionManager m;
m.setConnector(QxtHttpSessionManager::HttpServer);
QxtWebCgiService* svc = new QxtWebCgiService(app.applicationDirPath() + CLIENT_NAME, &m, &m);
qDebug() << svc->binary();
m.setStaticContentService(svc);
m.setAutoCreateSession(false);
m.setPort(8192);
m.start();
return app.exec();
}
|