Lines Matching refs:address
27 bool ParseNetAddress(const std::string& address, std::string* host, int* port, in ParseNetAddress() argument
33 size_t colons = std::count(address.begin(), address.end(), ':'); in ParseNetAddress()
34 size_t dots = std::count(address.begin(), address.end(), '.'); in ParseNetAddress()
36 if (address[0] == '[') { in ParseNetAddress()
38 if (address.rfind("]:") == std::string::npos) { in ParseNetAddress()
39 *error = StringPrintf("bad IPv6 address '%s'", address.c_str()); in ParseNetAddress()
42 *host = address.substr(1, (address.find("]:") - 1)); in ParseNetAddress()
43 port_str = address.substr(address.rfind("]:") + 2); in ParseNetAddress()
47 *host = address; in ParseNetAddress()
51 std::vector<std::string> pieces = Split(address, ":"); in ParseNetAddress()
60 *error = StringPrintf("no host in '%s'", address.c_str()); in ParseNetAddress()
68 address.c_str()); in ParseNetAddress()