Hi Lennart, Thanks for your reply. It's very helpful.
I think our case belongs to the exceptions where the constant monitoring is neccessory. So we will need to keep AvahiServiceResolver around. My further question is, when will the AvahiServiceResolver be free. Do I need to release the resolver somewhere in my application or avahi itself will manage those resolvers? Thanks, Arhold On Dec 18, 2007 2:28 AM, Lennart Poettering <[EMAIL PROTECTED]> wrote: > On Fri, 30.11.07 15:21, Arhold ([EMAIL PROTECTED]) wrote: > > Hi! > > > In this scenario - service unreachable and then recovered, which is the > > right way to handle in browser side? Is it necessary to call > > avahi_service_resolver_free when AVAHI_RESOLVER_FAILURE? I try to remove > > that code and when the netif was recovered, the browser will be able t o > get > > the service again. > > If you keep the AvahiServiceResolver object around after having > received the first AVAHI_RESOLVER_FOUND or AVAHI_RESOLVE_FAILURE > event, then you will be notified whenever the service > disappears/reappers/changes. It is perfectly valid to keep the > resolver around for applications which want to constantly monitor a > service and its service data. > > Please note however, that usually resolving a service is a "one-shot" > thing, i.e. it should only be issued when actually connecting to a > service, and not already when discovering it. There are only very few > exceptions where the constant monitoring makes sense, one of them > being iChat's _presence._tcp. > > I hope this answers your question. I didn't fully understood your > problem, so if this does not answer your question, feel free to ask > again. > > Lennart > > -- > Lennart Poettering Red Hat, Inc. > lennart [at] poettering [dot] net ICQ# 11060553 > http://0pointer.net/lennart/ GnuPG 0x1A015CC4 > _______________________________________________ > avahi mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/avahi >
_______________________________________________ avahi mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/avahi
