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

Method PrintHostByRfc

library/cpp/neh/utils.cpp:26–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26TString NNeh::PrintHostByRfc(const NAddr::IRemoteAddr& addr) {
27 TStringStream ss;
28
29 if (addr.Addr()->sa_family == AF_INET) {
30 NAddr::PrintHost(ss, addr);
31 } else if (addr.Addr()->sa_family == AF_INET6) {
32 ss << '[';
33 NAddr::PrintHost(ss, addr);
34 ss << ']';
35 }
36 return ss.Str();
37}
38
39NAddr::IRemoteAddrPtr NNeh::GetPeerAddr(SOCKET s) {
40 TAutoPtr<NAddr::TOpaqueAddr> addr(new NAddr::TOpaqueAddr());

Callers

nothing calls this directly

Calls 2

AddrMethod · 0.45
StrMethod · 0.45

Tested by

no test coverage detected