626 po::variables_map vm;
629 vm = conf.Parse(argc, argv);
631 #if BOOST_VERSION > 104000 632 catch (po::multiple_occurrences &e)
634 cerr <<
"Program options invalid due to: " << e.what() <<
" of '" << e.get_option_name() <<
"'." << endl;
640 cerr <<
"Program options invalid due to: " << e.what() << endl;
644 if (conf.HasVersion() || conf.HasPrint() || conf.HasHelp())
653 ba::io_service io_service;
655 const uint16_t n = conf.Get<uint16_t>(
"num");
656 uint16_t port = conf.Get<uint16_t>(
"port");
658 vector<shared_ptr<tcp_server>> servers;
660 for (
int i=0;
i<n;
i++)
662 shared_ptr<tcp_server> server(
new tcp_server(io_service, port,
i));
663 servers.push_back(server);
void Setup(const std::string &dns="", const std::string &host="")
Commandline parsing, resource file parsing and database access.
void SetupConfiguration(::Configuration &conf)