Loading CMakeLists.txt +1 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ target_include_directories(guestbook ) target_link_libraries(guestbook netplus::netplus netplus::netplus-static htmlpp::htmlpp-static httppp::httppp-static cmdplus::cmdplus Loading CMakeSettings.json 0 → 100644 +15 −0 Original line number Diff line number Diff line { "configurations": [ { "name": "x64-Debug", "generator": "Ninja", "configurationType": "Debug", "inheritEnvironments": [ "msvc_x64_x64" ], "buildRoot": "${projectDir}\\out\\build\\${name}", "installRoot": "${projectDir}\\out\\install\\${name}", "cmakeCommandArgs": "", "buildCommandArgs": "", "ctestCommandArgs": "" } ] } No newline at end of file guest.txt +1 −0 Original line number Diff line number Diff line Loading @@ -30,3 +30,4 @@ win98|win98 gdrgd|drgdrg gdrgd|drgdrg gdrgd|drgdrg Jan Koester|windows iocp test main.cpp +10 −6 Original line number Diff line number Diff line Loading @@ -10,6 +10,8 @@ #include <htmlpp/html.h> #include <htmlpp/exception.h> #include <netplus/exception.h> std::mutex file_mutex; struct Browser { Loading @@ -24,7 +26,9 @@ public: page.loadFile(index,"guest.html"); rpage.loadFile(rindex,"retro.html"); }catch(libhtmlpp::HTMLException &e){ throw e.what(); netplus::NetException ee; ee[netplus::NetException::Error] << e.what(); throw ee.what(); } }; Loading Loading @@ -71,7 +75,7 @@ public: } void RequestEvent(libhttppp::HttpRequest *curreq,int tid,void *arg){ void RequestEvent(libhttppp::HttpRequest *curreq,int tid,ULONG_PTR arg){ try { libhttppp::HttpForm gform; Loading Loading @@ -176,18 +180,18 @@ private: class HttpConD : public libhttppp::HttpD { public: HttpConD(int argc, char** argv) : HttpD(argc,argv){ HttpConD(int cargc, char** cargv) : HttpD(cargc,cargv){ libhttppp::HTTPException httpexception; try { Controller ctl(getServerSocket()); ctl.runEventloop(); }catch(const char *e){ std::cerr << e << std::endl; }catch(netplus::NetException &e){ std::cerr << e.what() << std::endl; } }; private: }; int main(int argc, char** argv){ HttpConD(argc,argv); HttpConD cond(argc,argv); } Loading
CMakeLists.txt +1 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ target_include_directories(guestbook ) target_link_libraries(guestbook netplus::netplus netplus::netplus-static htmlpp::htmlpp-static httppp::httppp-static cmdplus::cmdplus Loading
CMakeSettings.json 0 → 100644 +15 −0 Original line number Diff line number Diff line { "configurations": [ { "name": "x64-Debug", "generator": "Ninja", "configurationType": "Debug", "inheritEnvironments": [ "msvc_x64_x64" ], "buildRoot": "${projectDir}\\out\\build\\${name}", "installRoot": "${projectDir}\\out\\install\\${name}", "cmakeCommandArgs": "", "buildCommandArgs": "", "ctestCommandArgs": "" } ] } No newline at end of file
guest.txt +1 −0 Original line number Diff line number Diff line Loading @@ -30,3 +30,4 @@ win98|win98 gdrgd|drgdrg gdrgd|drgdrg gdrgd|drgdrg Jan Koester|windows iocp test
main.cpp +10 −6 Original line number Diff line number Diff line Loading @@ -10,6 +10,8 @@ #include <htmlpp/html.h> #include <htmlpp/exception.h> #include <netplus/exception.h> std::mutex file_mutex; struct Browser { Loading @@ -24,7 +26,9 @@ public: page.loadFile(index,"guest.html"); rpage.loadFile(rindex,"retro.html"); }catch(libhtmlpp::HTMLException &e){ throw e.what(); netplus::NetException ee; ee[netplus::NetException::Error] << e.what(); throw ee.what(); } }; Loading Loading @@ -71,7 +75,7 @@ public: } void RequestEvent(libhttppp::HttpRequest *curreq,int tid,void *arg){ void RequestEvent(libhttppp::HttpRequest *curreq,int tid,ULONG_PTR arg){ try { libhttppp::HttpForm gform; Loading Loading @@ -176,18 +180,18 @@ private: class HttpConD : public libhttppp::HttpD { public: HttpConD(int argc, char** argv) : HttpD(argc,argv){ HttpConD(int cargc, char** cargv) : HttpD(cargc,cargv){ libhttppp::HTTPException httpexception; try { Controller ctl(getServerSocket()); ctl.runEventloop(); }catch(const char *e){ std::cerr << e << std::endl; }catch(netplus::NetException &e){ std::cerr << e.what() << std::endl; } }; private: }; int main(int argc, char** argv){ HttpConD(argc,argv); HttpConD cond(argc,argv); }