MCPcopy Create free account
hub / github.com/ddnet/ddnet / IsRegistered

Method IsRegistered

src/engine/client/serverbrowser.cpp:2381–2396  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2379}
2380
2381bool CServerBrowser::IsRegistered(const NETADDR &Addr)
2382{
2383 const int NumServers = m_pHttp->NumServers();
2384 for(int i = 0; i < NumServers; i++)
2385 {
2386 const CServerInfo &Info = m_pHttp->Server(i);
2387 for(int j = 0; j < Info.m_NumAddresses; j++)
2388 {
2389 if(net_addr_comp(&Info.m_aAddresses[j], &Addr) == 0)
2390 {
2391 return true;
2392 }
2393 }
2394 }
2395 return false;
2396}
2397
2398int CServerInfo::EstimateLatency(int Loc1, int Loc2)
2399{

Callers 1

SetStateMethod · 0.80

Calls 3

net_addr_compFunction · 0.85
NumServersMethod · 0.45
ServerMethod · 0.45

Tested by

no test coverage detected