MCPcopy Create free account
hub / github.com/Bitcoin-ABC/bitcoin-abc / LookupNumeric

Function LookupNumeric

src/netbase.cpp:257–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

255}
256
257CService LookupNumeric(const std::string &name, uint16_t portDefault,
258 DNSLookupFn dns_lookup_function) {
259 if (!ContainsNoNUL(name)) {
260 return {};
261 }
262 // "1.2:345" will fail to resolve the ip, but will still set the port.
263 // If the ip fails to resolve, re-init the result.
264 return Lookup(name, portDefault, /*fAllowLookup=*/false,
265 dns_lookup_function)
266 .value_or(CService{});
267}
268
269bool IsUnixSocketPath(const std::string &name) {
270#if HAVE_SOCKADDR_UN

Callers 8

GetPeerMethod · 0.85
add_onion_cbMethod · 0.85
auth_cbMethod · 0.85
GetLocalAddrForPeerFunction · 0.85
GetAddedNodeInfoMethod · 0.85
mainFunction · 0.85
TestParseFunction · 0.85
validateMethod · 0.85

Calls 3

ContainsNoNULFunction · 0.85
LookupFunction · 0.85
value_orMethod · 0.80

Tested by 1

TestParseFunction · 0.68