MCPcopy Create free account
hub / github.com/ElementsProject/elements / LookupNumeric

Function LookupNumeric

src/netbase.cpp:230–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228}
229
230CService LookupNumeric(const std::string& name, uint16_t portDefault, DNSLookupFn dns_lookup_function)
231{
232 if (!ValidAsCString(name)) {
233 return {};
234 }
235 CService addr;
236 // "1.2:345" will fail to resolve the ip, but will still set the port.
237 // If the ip fails to resolve, re-init the result.
238 if(!Lookup(name, addr, portDefault, false, dns_lookup_function))
239 addr = CService();
240 return addr;
241}
242
243/** SOCKS version */
244enum SOCKSVersion: uint8_t {

Callers 8

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

Calls 3

ValidAsCStringFunction · 0.85
LookupFunction · 0.85
CServiceClass · 0.70

Tested by 2

TestParseFunction · 0.68
FUZZ_TARGETFunction · 0.68