// // Created by rhetenor on 5/21/19. // #include "FlippRServer.h" #include "output/OutputRequestHandlerFactory.h" #include #include #include #include #include #include int main(int argc, char** argv) { flippR_driver::networking::FlippRServer app; return app.run(argc, argv); } namespace flippR_driver { namespace networking { using namespace Poco::Net; int FlippRServer::main(const std::vector& args) { if (!_helpRequested) { unsigned short port = (unsigned short) config().getInt("HTTPTimeServer.port", 9980); // todo XDG_RUNTIME_DIR SocketAddress address("/tmp/flippR_driver/S.flippR_driver"); ServerSocket svs(address); HTTPServer srv(new OutputRequestHandlerFactory(), svs, new HTTPServerParams); srv.start(); waitForTerminationRequest(); srv.stop(); } return Application::EXIT_OK; } } }