#include "MyTCPClient.h" #include #include #include #include #include #include std::atomic shouldStop = false; void signalHandler( int signum ) { shouldStop = true; } int main(int argc, char *argv[]) { signal(SIGINT, signalHandler); CLParser clParser(argc, argv); int port = clParser.getOption("port", 8080); auto host = clParser.getOption("host", "127.0.0.1"); MyTCPClient client(host, port); client.start(); while (!client.shouldStop() && !shouldStop) { usleep(100'000); } client.stop(); return 0; }