MCPcopy Create free account
hub / github.com/apple/foundationdb / toString

Method toString

flow/network.cpp:40–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40std::string IPAddress::toString() const {
41 if (isV6()) {
42 return boost::asio::ip::address_v6(std::get<IPAddressStore>(addr)).to_string();
43 } else {
44 auto ip = std::get<uint32_t>(addr);
45 return format("%d.%d.%d.%d", (ip >> 24) & 0xff, (ip >> 16) & 0xff, (ip >> 8) & 0xff, ip & 0xff);
46 }
47}
48
49Optional<IPAddress> IPAddress::parse(std::string const& str) {
50 try {

Callers 3

toIPVectorStringFunction · 0.45
formatIpPortFunction · 0.45
network.cppFile · 0.45

Calls 5

formatIpPortFunction · 0.85
formatFunction · 0.70
beginMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected