We have a server that we want to be able to advertise via zeroconf.
We have a client library that we want to be able to check for
available servers in the local area as well. Our software is
primarily for *nix, but it compiles for Darwin/MacOSX and for Windows
using MinGW. We do not want to assume that the host machine is
zeroconf enabled (our server is installed most frequently on Linux).
Zeroconf is not a noun, it's an adjective that describes the
environment. So when you say "advertise via zeroconf", that doesn't
make sense. There is no such thing as a Zeroconf protocol.
If you had said, advertise via mDNS-SD, or advertise via Rendezvous,
that would make sense.
To use zeroconf, as I understand it, we will need to:
1. On the server, add a thread that listens for zeroconf requests for
our service
2. On the server, periodically broadcast availability our service
over multicast
3. On the client, add the ability to send multicast service requests
and listen for responses
Yes, that's basically correct. However, the server will not
periodically broadcast availability. It will announce its presence
and then from that point, it will only respond when queried for.
You have two options. You can download the mDNSResponder project from
Darwin CVS which includes an mDNSResponder daemon for Windows and *nix
systems, and it exports the same DNSServiceDiscovery API used on Mac
OS X. Note that Mac OS X has a built-in mDNSResponder.
Or you could download Howl from Porchdog, which also implements an
mDNSResponder daemon for *nix and Windows, but it exports a slightly
different API.
From there, you would advertise the service on the server, and then
browse for the service on the client.
Thanks, Marc,
I was thinking that we would need to build the mDNSResponder into our
server, but it seems that we should simply provide a link in our
documentation to where our users can get it at Apple if they want to
run this on *nix or Windows. We would then make using
Rendezvous/ZeroConf an optional part of our server configuration
(--with-mdns=<path>). If configured to use Rendezvous/ZeroConf, then it
would start up, announce itself and then listen for requests.
In zeroconf, is there some concept of a local area deamon that caches
service announcements (like in SLP) or do all service providers (of
that type) respond to each request for the service type?
Each mDNSResponder on the network will maintain a local cache of all
records, so often times you can query for information without a packet
going out on the wire. If the information being requested is not in
the local cache, then each server machine will respond with the
resource records which answer the particular query.
Hope that helps.
-Marc
As for the client browsing without touching the network, the client
must be running a mDNSResponder for this to work? In our case, the
server and client are never on the same machine (except for testing).
I'm not sure that the machine running our server even needs
mDNSResponder at all as long as our app is listening for requests.
Scott
_______________________________________________
rendezvous mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/rendezvous
Do not post admin requests to the list. They will be ignored.