#include #include int main() { boost::asio::io_context ioc;//{ 2 }; boost::asio::io_context ioc2; //ssl::context ctx{ ssl::context::sslv23 }; //auto keepAlive = std::make_shared(ioc,std::move(ctx)); auto conf = std::make_shared("./config/config.json"); conf->RefreshData(); auto keepAlive = std::make_shared(conf, std::string("KeepAlive1"), ioc); auto keepAlive2 = std::make_shared(conf, std::string("KeepAlive2"), ioc); std::string name = "Tester"; keepAlive->Reconfigure(name); std::cout << "Connected to KeepAlive as " << name << std::endl; keepAlive2->Reconfigure(name + "2"); std::cout << "Connected to KeepAlive2 as " << name << std::endl; while (1) { keepAlive->Send(); keepAlive2->Send(); std::this_thread::sleep_for(std::chrono::seconds(1)); } }