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

Function HandleSimultaneousProbeClaim

engine/dlib/src/dlib/mdns.cpp:1389–1401  ·  view source on GitHub ↗

Returns true when the remote authority claims outrank our tentative data, meaning we lost the simultaneous-probe tiebreak for this unique name.

Source from the content-addressed store, hash-verified

1387 // Returns true when the remote authority claims outrank our tentative data,
1388 // meaning we lost the simultaneous-probe tiebreak for this unique name.
1389 static bool HandleSimultaneousProbeClaim(const uint8_t* data, uint32_t size, uint32_t section_offset, uint16_t record_count,
1390 const char* target_name, const ProbeRecord* local_records, uint32_t local_count)
1391 {
1392 ProbeRecord incoming[MDNS_MAX_PROBE_RECORDS];
1393 uint32_t incoming_count = 0;
1394 if (!CollectProbeClaims(data, size, section_offset, record_count, target_name, incoming, MDNS_MAX_PROBE_RECORDS, &incoming_count))
1395 return false;
1396
1397 if (incoming_count == 0)
1398 return false;
1399
1400 return CompareProbeRecordSets(local_records, local_count, incoming, incoming_count) < 0;
1401 }
1402
1403 static void HandleIncomingResponseRecords(MDNS* mdns, const uint8_t* data, uint32_t size, uint32_t* offset, uint32_t record_count)
1404 {

Callers 1

HandleIncomingQueriesFunction · 0.85

Calls 2

CollectProbeClaimsFunction · 0.85
CompareProbeRecordSetsFunction · 0.85

Tested by

no test coverage detected