#include #include "../shared/GlobalConfigFile.h" #include "../shared/Ping.h" #include "../shared/ReplyToClient.h" #include "../shared/InputFramework.h" #include "../shared/CommandDispatcher.h" #include "../shared/NewConnections.h" #include "Subscriptions.h" int main(int argc, char *argv[]) { if (!addConfigItemsFromCommandLine(argv + 1)) { return 1; } configItemsComplete(); int listenPort = strtolDefault(getConfigItem("listen_port", "1984"), -1); if (listenPort == -1) { std::cerr<<"Invalid listen port \"" <getInput(), commandDispatcher->getInputCallbackId()); // Start listening to new sockets now, after the other modules have // had time to configure themselves. NewConnections newConnections(&listener, listenPort); if (!newConnections.getSuccess()) { std::cerr<<"Unable to listen for new connections.\n"; return 3; } while (true) sleep(120); }