Post

Replies

Boosts

Views

Activity

Reply to How to use DNSServiceReconfirmRecord?
We're using a service subtype, which is the stuff after the comma. (Our library defines the service type, but each app that uses it provides a different subtype so they don't see services published by other apps.) My co-worker found out (from Google's AI...) that in this case the fullName should be of the form <Subtype>._sub.<ServiceType>.<Transport>.<Domain> and the record should be the encoded form of <InstanceName>.<ServiceType>.<Transport>.<Domain>. I changed my code accordingly and now it works on all platforms.
4d
Reply to How to use DNSServiceReconfirmRecord?
I may have spoken too soon -- it worked for me on macOS [15.7.3] but a co-worker reports it's still returning BadReference on iOS [26?]. From my logging I can see that the arguments passed in this specific failing call are as follows: vector<uint8_t> record = encodeDNS("multipeer-todo-0F2BDA36._couchbaseP2P._tcp,com\\.couchbase\\.multipeer\\.todo.local."); err = DNSServiceReconfirmRecord( 0, // flags 15, // interface; this is what was reported by service discovery "_couchbaseP2P._tcp,com\.couchbase\\.multipeer\\.todo.local.", // fullname kDNSServiceType_PTR, kDNSServiceClass_IN, record.size(), record.data() ); where encodeDNS is a function I wrote to generate an encoded DNS record, which has unit tests to verify it correctly handles escape sequences. Note we're using a service subtype. I was worried this might require special handling, but at least on macOS it didn't. Perhaps that's different on iOS? The kDNSServiceErr_BadReference error is odd in that the function doesn't take a service reference.
5d