27 asio::io_context &io_context,
28 const std::string &file_name,
30 std::chrono::seconds timeout
33 client(file, connection),
48 static int main(
int argc,
char **argv)
53 std::cerr <<
"usage: " << argv[0] <<
" <config.joedbi>\n";
57 const char *
const config_file_name = argv[1];
58 db::multi_server::Readonly_Database db
60 Readonly_Interpreted_File{config_file_name}
63 IO_Context_Wrapper io_context_wrapper;
65 std::list<std::unique_ptr<Server_Data>> servers;
67 for (
auto server: db.get_server_table())
73 io_context_wrapper.io_context,
74 db.get_file_name(server),
75 uint16_t(db.get_port(server)),
76 std::chrono::seconds(db.get_timeout(server))
81 io_context_wrapper.run();
88int main(
int argc,
char **argv)
Server_Data(asio::io_context &io_context, const std::string &file_name, uint16_t port, std::chrono::seconds timeout)
@ write_existing_or_create_new
either write_existing or create_new depending on whether the file exists. Racy in Posix,...
int main_exception_catcher(int(*main)(int, char **), int argc, char **argv)
Catch exception from main.