Home | History | Annotate | Download | only in base

Lines Matching refs:address

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