#include #include #include "../../ax_alert_server/AlertConfig.h" #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 "../../shared/NewWorkerCluster.h" #include "../AutoSecondaryData.h" #include "../AutoSymbolListScheduler.h" #include "HistoryDirectory.h" #include "../../shared/Marshal.h" int main(int argc, char** argv) { setlocale(LC_ALL, ""); addConfigItems("zlib_level=Z_BEST_SPEED"); addConfigItems("main_thread_count=4"); addConfigItems("listen_port=7797"); if (!addConfigItemsFromCommandLine(argv + 1)) { _exit(1); } configItemsComplete(); testMarshal(); initAutoSymbolListScheduler(); AllConfigInfo::init(/* fixFloats = */ false); int listenPort = strtolDefault(getConfigItem("listen_port"), -1); if (listenPort == -1) { std::cerr<<"Invalid listen port \""<getInput(), commandDispatcher->getInputCallbackId()); HistoryDirectory::initHistoryDirectory(); //initHistoryDirectoryManager(); //initTopListHistory(workerCluster); // 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"; _exit(3); } while (true) sleep(60); }