13 static int keepalive_test(
Arguments &arguments)
17 const std::string_view user = arguments.get_next(
"user");
18 const std::string_view host = arguments.get_next(
"host");
19 const std::string_view endpoint_path = arguments.get_next(
"endpoint_path");
21 if (arguments.missing())
23 arguments.print_help(std::cerr);
27 std::chrono::seconds wait(1);
28 std::chrono::seconds increment(1);
42 channel.set_timeout(wait + increment + std::chrono::seconds(30));
43 client.pull(wait + increment);
44 wait = wait + increment;
47 catch (
const std::exception &e)
49 std::cerr <<
"Caught exception: " << e.what() <<
'\n';
50 increment = (std::chrono::seconds(3) + increment) / 4;
58int main(
int argc,
char **argv)
Class for conveniently parsing command-line arguments.
Writable specialization of Client.
int main_wrapper(int(*main)(Arguments &), int argc, char **argv)
Process command-line arguments and catch exceptions from main.