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

Method BindAddresses

library/cpp/http/server/options.cpp:25–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23}
24
25void THttpServerOptions::BindAddresses(TBindAddresses& ret) const {
26 THashSet<TString> check;
27
28 for (auto addr : BindSockaddr) {
29 if (!addr.Port) {
30 addr.Port = Port;
31 }
32
33 const TString straddr = AddrToString(addr);
34
35 if (check.find(straddr) == check.end()) {
36 check.insert(straddr);
37 ret.push_back(ToNetworkAddr(addr.Addr, addr.Port));
38 }
39 }
40
41 if (ret.empty()) {
42 ret.push_back(Host ? TNetworkAddress(Host, Port) : TNetworkAddress(Port));
43 }
44}
45
46void THttpServerOptions::DebugPrint(IOutputStream& stream) const noexcept {
47 stream << "Port: " << Port << "\n";

Callers 1

TryToBindAddressesFunction · 0.80

Calls 8

AddrToStringFunction · 0.85
ToNetworkAddrFunction · 0.85
TNetworkAddressClass · 0.50
findMethod · 0.45
endMethod · 0.45
insertMethod · 0.45
push_backMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected