ultimatepp/bazaar/SkylarkGuiExample/WebInterface.cpp
zbych bff0f52f4e Simple application combining web server and gui
git-svn-id: svn://ultimatepp.org/upp/trunk@9909 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2016-06-07 20:03:42 +00:00

36 lines
559 B
C++

#include "WebInterface.h"
#include "Config.h"
using namespace Upp;
WebInterface::WebInterface()
{
Ini::skylark_log = Config::WebInterfaceTrace;
port = Config::WebInterfacePort;
root = "";
prefork = 0; //important!
session.cookie = "__Skylark_Gui_session_cookie__";
use_caching = false;
thr.Run(THISBACK(Run));
}
WebInterface::~WebInterface()
{
StopServer();
}
void WebInterface::WorkThread()
{
/*
Open database connection here
*/
RunThread();
}
void WebInterface::StopServer()
{
Quit();
thr.Wait();
}