25 std::string GNet::Local::m_name_override ;
26 bool GNet::Local::m_name_override_set = false ;
32 throw Error(
"cannot determine the hostname for this machine" ) ;
38 return m_name_override_set ? m_name_override :
hostname() ;
43 m_name_override = override ;
44 m_name_override_set = true ;
static Address loopback(Family, unsigned int port=0U)
Returns a loopback address.
static std::string canonicalName()
Returns the canonical network name assiciated with hostname().
static std::string hostname()
Returns the local hostname. Returns "localhost" on error.
std::string hostname()
Returns the hostname.
static bool isLocal(const Address &, std::string &reason)
Returns true if the given address appears to be associated with the local host, or a helpful error me...