#include int main(int argc, char* argv[]) { int port = 8080; if (argc >= 2) { port = std::stoi(argv[1]); } TCPClient client("127.0.0.1", port); // Replace "127.0.0.1" with the IP address of your server and 8080 with the port number client.start(); while (true) { std::string message; std::cout << "Enter message ('quit' to exit): "; std::getline(std::cin, message); if (message == "quit") { client.stop(); break; } if (message == "ready") { client.sendMessage("lidar;strat;ready;1"); std::this_thread::sleep_for(std::chrono::milliseconds(100)); client.sendMessage("aruco;strat;ready;1"); std::this_thread::sleep_for(std::chrono::milliseconds(100)); client.sendMessage("arduino;strat;ready;1"); std::this_thread::sleep_for(std::chrono::milliseconds(100)); client.sendMessage("tirette;strat;ready;1"); std::this_thread::sleep_for(std::chrono::milliseconds(100)); client.sendMessage("servo_moteur;strat;ready;1"); } else { client.sendMessage(message); } } return 0; }