23#include "plugin_tool.h"
25#include <core/threading/thread.h>
26#include <netcomm/fawkes/client.h>
27#include <utils/system/argparser.h>
28#include <utils/system/signal.h>
37main(
int argc,
char **argv)
41 if (argp.has_arg(
"h")) {
48 std::string host =
"localhost";
49 unsigned short int port = 1910;
50 if (argp.has_arg(
"r")) {
51 argp.parse_hostport(
"r", host, port);
58 printf(
"Could not connect to host: %s (%s)\n", host.c_str(), e.
what_no_backtrace());
63 SignalManager::register_handler(SIGINT, pt);
65 SignalManager::finalize();
71 Thread::destroy_main();
Parse command line arguments.
Base class for exceptions in Fawkes.
virtual const char * what_no_backtrace() const noexcept
Get primary string (does not implicitly print the back trace).
Simple Fawkes network client.
void connect()
Connect to remote.
void disconnect()
Disconnect socket.
Fawkes library namespace.