Contents

CFNetServiceSetTXTData(_:_:)

Sets the TXT record for a CFNetService.

Declaration

func CFNetServiceSetTXTData(_ theService: CFNetService, _ txtRecord: CFData) -> Bool

Parameters

  • theService:

    CFNetServiceRef for which a TXT record is to be set; cannot be NULL.

  • txtRecord:

    Contents of the TXT record that is to be set. The contents must not exceed 1450 bytes.

Return Value

TRUE if the TXT record was set; otherwise, FALSE.

Discussion

This function sets a TXT record for the specified service. If the service is currently registered on the network, the record is broadcast. Setting a TXT record on a service that is still being resolved is not allowed.

Special Considerations

This function is thread safe.

See Also

Network Services