MCPcopy Create free account
hub / github.com/defold/defold / ResolveCurrentHostAddress

Function ResolveCurrentHostAddress

engine/dlib/src/dlib/mdns.cpp:2232–2247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2230 }
2231
2232 static bool ResolveCurrentHostAddress(const MDNS* mdns, dmSocket::Address* out)
2233 {
2234 if (mdns->m_InterfaceAddresses.Size() > 0)
2235 {
2236 *out = mdns->m_InterfaceAddresses[0];
2237 return true;
2238 }
2239
2240 if (!dmSocket::Empty(mdns->m_DefaultAddress) && mdns->m_DefaultAddress.m_family == dmSocket::DOMAIN_IPV4)
2241 {
2242 *out = mdns->m_DefaultAddress;
2243 return true;
2244 }
2245
2246 return false;
2247 }
2248
2249 static void RefreshRegisteredServiceAddresses(MDNS* mdns)
2250 {

Callers 1

Calls 2

EmptyFunction · 0.70
SizeMethod · 0.45

Tested by

no test coverage detected