MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / forAddress

Method forAddress

base/poco/Net/src/NetworkInterface.cpp:782–798  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

780
781
782NetworkInterface NetworkInterface::forAddress(const IPAddress& addr)
783{
784 Map map = NetworkInterface::map(true, false);
785 Map::const_iterator it = map.begin();
786 Map::const_iterator end = map.end();
787
788 for (; it != end; ++it)
789 {
790 const std::size_t count = it->second.addressList().size();
791 for (int i = 0; i < count; ++i)
792 {
793 if (it->second.address(i) == addr)
794 return it->second;
795 }
796 }
797 throw InterfaceNotFoundException(addr.toString());
798}
799
800
801NetworkInterface NetworkInterface::forIndex(unsigned i)

Callers

nothing calls this directly

Calls 6

mapFunction · 0.85
beginMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45
addressMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected