28std::vector<GNet::Address> GNet::nameservers(
unsigned int port )
30 std::vector<GNet::Address> result ;
32 std::ifstream f(
"/etc/resolv.conf" ) ;
35 std::string_view sv( line ) ;
static bool validStrings(std::string_view ip, std::string_view port_string, std::string *reason=nullptr)
Returns true if the combined network-address string and port string is valid.
static Address parse(std::string_view display_string)
Factory function for any address family.
static bool imatch(char, char) noexcept
Returns true if the two characters are the same, ignoring seven-bit case.
static std::istream & readLine(std::istream &stream, std::string &result, std::string_view eol={}, bool pre_erase_result=true, std::size_t limit=0U)
Reads a line from the stream using the given line terminator, which may be multi-character.
A zero-copy string token iterator where the token separators are runs of whitespace characters,...