Are the functions used in the TicTacToe example high level?
Yes.
Suppose a host that has advertised its service goes offline. If it
comes back online before its DNS record's TTL expires should that
record remain a valid one that can be used to connect with?
Yes. In Bonjour you browse for a service type and get back a set of service name / type / domain tuples. As long as the now-back-online host uses the same tuple for its service, the connection will work.
In systems where IP addresses are dynamically allocated will the DNS
record remain valid if the IP address for the DNS record's host device
has changed?
Yes. You’ll note that the IP address isn’t in the above tuple. When you go to connect you resolve that tuple to a DNS name and IP addresses, which only have to be valid at the time you connect.
Does a host that has advertised a service have a means of erasing its
DNS record in the Wi-Fi router?
This question doesn’t make sense. Bonjour service discovery is entirely independent of network infrastructure [1].
When the host advertises can it set the TTL time?
No.
Keep in mind that Bonjour is a marketing name for three Internet standards:
The key one here is RFC 6762, which explains how Bonjour extends DNS to work without any network infrastructure, using multicasts to maintain a distributed database of DNS records. If you want to know how this really works, that’s the place to go.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
[1] Well… that’s not 100% true. If the Wi-Fi router offers a sleep proxy service then that might be a relevant question, but I doubt that’s the case here.