13 static int rpc_server(
Arguments &arguments)
17 const std::string_view endpoint_option = arguments.get_string_option
24 const std::string_view file = arguments.get_next(
"<file.joedb>");
26 if (arguments.missing())
28 arguments.print_help(std::cerr);
32 const std::string endpoint_path = endpoint_option.empty()
33 ? std::string(file) +
".rpc.sock"
34 : std::string(endpoint_option);
36 tutorial::File_Client client(file.data());
37 tutorial::rpc::Service service(client);
39 tutorial::rpc::Procedures procedures(service);
44 logger.get_log_level(),
46 std::string(endpoint_path),
57int main(
int argc,
char **argv)
Class for conveniently parsing command-line arguments.
int main_wrapper(int(*main)(Arguments &), int argc, char **argv)
Process command-line arguments and catch exceptions from main.
const auto & get_signatures()
Get the list of procedure signatures. Used by RPC client and server.