MCPcopy Create free account
hub / github.com/catboost/catboost / IsLocalName

Method IsLocalName

util/network/socket.cpp:964–973  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

962 }
963
964 inline bool IsLocalName(const char* name) const noexcept {
965 struct sockaddr_in sa;
966 memset(&sa, 0, sizeof(sa));
967
968 if (inet_pton(AF_INET, name, &(sa.sin_addr)) == 1) {
969 return (InetToHost(sa.sin_addr.s_addr) >> 24) == 127;
970 }
971
972 return contains(name);
973 }
974 };
975} // namespace
976

Callers 1

TImplMethod · 0.80

Calls 2

InetToHostFunction · 0.85
containsFunction · 0.50

Tested by

no test coverage detected