#include #include #include "../shared/Messages.h" #include "../shared/SocketInfo.h" #include "../shared/InputFramework.h" #include "../shared/CommandDispatcher.h" #include "UserRequestControl.h" #include "../shared/ReplyToClient.h" #include "../shared/NewConnections.h" #include "../shared/GlobalConfigFile.h" #include "UserInfo.h" #include "Download.h" #include "SymbolLists.h" #include "MiscRODatabase.h" #include "AlertConfig.h" #include "../shared/Ping.h" #include "OddsMaker.h" #include "TopList.h" #include "MiscThread.h" #include "../shared/MarketHours.h" #include "ClientUseCase.h" int main(int argc, char *argv[]) { setlocale(LC_ALL, ""); addConfigItems("listen_port=8888"); if (!addConfigItemsFromCommandLine(argv + 1)) { return 1; } configItemsComplete(); AllConfigInfo::init(); int listenPort = strtolDefault(getConfigItem("listen_port"), -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(60); }