Hey Martin,
On Jul 7, 2006, at 8:58 AM, Martin Redington wrote:
> I think this is one for Marc, but I've posted to the list, as other
> people may find it useful.
>
> I have just started rolling Bonjour subtypes into my application
>
> So far all seems to be working well.
>
> I publish and browse for services of the form
>
> _type._tcp,_subtype
>
> and everything works exactly as I'd expect, with only a very small
> number of code changes for me :-)
>
> However, the callbacks get passed the type as _type._tcp.
>
> This works fine during my initial service discovery phase, where I'm
> triggering address resolution as soon as I see the services (from
> within the browsing callback).
>
> Later on, in program execution, I resolve each service again before
> trying to connect to it. Here, I pass in the service name, and type
> (_type._tcp.) to DNSServiceResolve ( get an error if I pass in the
> full subtype string).
>
> My question is, if two services have different subtypes, are they
> guaranteed to be given different names, in the same way that services
> of the same type are.
Yes, all services registered with subtypes are additionally registered
with the main type, and the main type is the thing that's used to
detect name conflicts, so even if the subtypes are different, you'll
get a conflict when registering.
Best Regards,
-Marc