[avahi] [SPAM] - Re: publish-update problem - Email found in subject
lennart at poettering.net
Mon Apr 21 13:15:27 PDT 2008
On Mon, 21.04.08 12:46, James, Neil (Neil.James at gdcanada.com) wrote:
> It seems that I was trekking down the wrong path, so what is the right
> one? There are notes in defs.h about how to publish updates to the txt
> portion of service. So what is the recommended method of subscribbing to
> these updates? I thought browsing was the way to go, but if there is a
> better way can somebody describe it to me?
Browsing will only inform you about services that are available,
are coming or are going.
Resolving will inform you about all the meta data of a service,
i.e. everything that goes beyond a mere name: address, port, host, TXT
Usually resolving is a one-shot operation: if a user chose one of the
items from the service list you just resolve it and connect to it, and
the close the resolver again.
However in some situations (like yours apparently) it makes sense to
get notifications about meta data changes (i.e. addres, port, host,
TXT data changes). For these cases you can keep the resolver open. It
will then notify you each time the meta data changes (by raising
another AVAHI_RESOLVER_FOUND) or if this specific service goes away
(AVAHI_RESOLVER_FAILURE) or comes back (AVAHI_RESOLVER_FOUND).
Long story short: just keep your resolver open and what for more
AVAHI_RESOLVER_FOUND. That's it.
Lennart Poettering Red Hat, Inc.
lennart [at] poettering [dot] net ICQ# 11060553
http://0pointer.net/lennart/ GnuPG 0x1A015CC4
More information about the avahi