#include #include #include namespace fc { std::vector resolve( const fc::string& host, uint16_t port ) { auto ep = fc::asio::tcp::resolve( host, std::to_string(uint64_t(port)) ); std::vector eps; eps.reserve(ep.size()); for( auto itr = ep.begin(); itr != ep.end(); ++itr ) { if( itr->address().is_v4() ) { eps.push_back( fc::ip::endpoint(itr->address().to_v4().to_ulong(), itr->port()) ); } // TODO: add support for v6 } return eps; } }