#include
#include
#include
#include
#include
struct Host
{
std::string ip;
uint16_t port{ 0 };
};
bool test(const Host& host)
{
using namespace apache::thrift;
using namespace apache::thrift::protocol;
using namespace apache::thrift::transport;
auto ptr = new TSocket(host.ip, host.port);
ptr->setConnTimeout(10000);
stdcxx::shared_ptr socket(ptr);
stdcxx::shared_ptr transport(new TBufferedTransport(socket));
stdcxx::shared_ptr protocol(new TBinaryProtocol(transport));
api::APIClient client(protocol);
bool ret = false;
try {
std::cout