MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / Lookup

Function Lookup

src/netbase.cpp:138–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138bool Lookup(const char* pszName, vector<CService>& vAddr, int portDefault, bool fAllowLookup,
139 unsigned int nMaxSolutions) {
140 if (pszName[0] == 0)
141 return false;
142 int port = portDefault;
143 string hostname = "";
144 SplitHostPort(string(pszName), port, hostname);
145
146 vector<CNetAddr> vIP;
147 bool fRet = LookupIntern(hostname.c_str(), vIP, nMaxSolutions, fAllowLookup);
148 if (!fRet)
149 return false;
150 vAddr.resize(vIP.size());
151 for (unsigned int i = 0; i < vIP.size(); i++) vAddr[i] = CService(vIP[i], port);
152 return true;
153}
154
155bool Lookup(const char* pszName, CService& addr, int portDefault, bool fAllowLookup) {
156 vector<CService> vService;

Callers 6

LookupNumericFunction · 0.85
CServiceMethod · 0.85
AppInitFunction · 0.85
TESTFunction · 0.85
getaddednodeinfoFunction · 0.85

Calls 5

SplitHostPortFunction · 0.85
LookupInternFunction · 0.85
CServiceClass · 0.70
resizeMethod · 0.45
sizeMethod · 0.45

Tested by 1

TESTFunction · 0.68