On 28 Mar 2016, at 02:48, Jeff Johnson <[email protected]> wrote:

> Is that supposed to happen?

Yes.  Think of the analogous case with IPv4: if you register a service in 
"local.", you want the service registered with your standard IPv4 address.

> And is there any way to stop it?

Definitely not at the NSNetService layer.

At the DNS-SD layer (<dns_sd.h>) you have a lot more flexibility.  For example, 
you could register your own A record (DNSServiceRegisterRecord) and then 
register your service with that name as its host (the `host` parameter to 
DNSServiceRegister).  I've never tried this myself but I can't see why it 
wouldn't work.

A good place to start with DNS-SD is the DNSSDObjects sample code, which gives 
some examples of how to wrap DNS-SD in an Objective-C shell that'll be more 
familiar to folks coming from NSNetService.

<https://developer.apple.com/library/mac/#samplecode/DNSSDObjects/>

Overall, however, I think you'd be better off nagging the folks with the broken 
client to fix their connection code.  IPv6 is becoming increasingly common [1] 
so fixing this on the server side seems like heading in the wrong direction.

Share and Enjoy
--
Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

[1] Especially in the light of "Supporting IPv6 in iOS 9".

<https://developer.apple.com/news/?id=08282015a>.


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to