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

Function WriteRecordData

engine/dlib/src/dlib/mdns.cpp:732–741  ·  view source on GitHub ↗

Writes prebuilt rdata bytes after a record header. Probe construction uses this so the same canonical rdata can be shared between comparisons and I/O.

Source from the content-addressed store, hash-verified

730 // Writes prebuilt rdata bytes after a record header. Probe construction uses
731 // this so the same canonical rdata can be shared between comparisons and I/O.
732 static bool WriteRecordData(uint8_t* buffer, uint32_t buffer_size, uint32_t* offset,
733 const uint8_t* data, uint16_t data_length)
734 {
735 if (*offset + data_length > buffer_size)
736 return false;
737
738 memcpy(buffer + *offset, data, data_length);
739 *offset += data_length;
740 return true;
741 }
742
743 // Builds canonical SRV rdata once so probes, responses, and tiebreak
744 // comparisons all operate on the same byte representation.

Callers 1

WriteCanonicalRecordFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected