src/netbase.cpp
bool LookupHost(const std::string& name, std::vector<CNetAddr>& vIP, unsigned int nMaxSolutions, bool fAllowLookup)
{
    if (!ValidAsCString(name)) {
        return false;
    }
    std::string strHost = name;
    if (strHost.empty())
        return false;
    if (strHost.front() == '[' && strHost.back() == ']') {
        strHost = strHost.substr(1, strHost.size() - 2);
    }

    return LookupIntern(strHost, vIP, nMaxSolutions, fAllowLookup);
}
/**
 * Resolve a host string to its corresponding network addresses.
 *
 * @param name    The string representing a host. Could be a name or a numerical
 *                IP address (IPv6 addresses in their bracketed form are
 *                allowed).
 * @param[out] vIP The resulting network addresses to which the specified host
 *                 string resolved.
 *
 * @returns Whether or not the specified host string successfully resolved to
 *          any resulting network addresses.
 *
 * @see Lookup(const char *, std::vector<CService>&, int, bool, unsigned int)
 *      for additional parameter descriptions.
 */
Resolve a host string to its corresponding network addresses.
@param name    The string representing a host. Could be a name or a numerical
IP address (IPv6 addresses in their bracketed form are
allowed).
@param[out] vIP The resulting network addresses to which the specified host
string resolved.

@returns Whether or not the specified host string successfully resolved to
any resulting network addresses.

@see Lookup(const char *, std::vector&, int, bool, unsigned int)
for additional parameter descriptions.
Resolve a host string to its corresponding network addresses . @param name The string representing a host . Could be a name or a numerical IP address ( IPv6 addresses in their bracketed form are allowed ) . @param [ out ] vIP The resulting network addresses to which the specified host string resolved . @returns Whether or not the specified host string successfully resolved to any resulting network addresses . @see Lookup ( const char * std :: vector& int bool unsigned int ) for additional parameter descriptions .
bool LookupHost(const std::string& name, std::vector<CNetAddr>& vIP, unsigned int nMaxSolutions, bool fAllowLookup)
{
    if (!ValidAsCString(name)) {
        return false;
    }
    std::string strHost = name;
    if (strHost.empty())
        return false;
    if (strHost.front() == '[' && strHost.back() == ']') {
        strHost = strHost.substr(1, strHost.size() - 2);
    }
    return LookupIntern(strHost, vIP, nMaxSolutions, fAllowLookup);
}
bool LookupHost ( const std :: string & name , std :: vector < CNetAddr > & vIP , unsigned int nMaxSolutions , bool fAllowLookup ) { if ( ! ValidAsCString ( name ) ) { return false ; } std :: string strHost = name ; if ( strHost . empty ( ) ) return false ; if ( strHost . front ( ) == ' ' && strHost . back ( ) == ' ' ) { strHost = strHost . substr ( 1 , strHost . size ( ) - 2 ) ; } return LookupIntern ( strHost , vIP , nMaxSolutions , fAllowLookup ) ; }
Resolve a host string to its corresponding network addresses.
Resolve a host string to its corresponding network addresses .