[avahi] Client Browser questions

Rajesh Sai T tsairajesh at gmail.com
Tue Apr 12 22:44:52 PDT 2011


Hi Nathan,

Even im looking out for a potential possibility to know if any
device publishing the service has been removed from LAN and all rest of
devices get a REMOVE notification so that respective devices can update
their cache. If any new device comes up, we get BROWSER_NEW event in
browser_callback but there isnt any event for REMOVE. Could you please just
share your idea how could we achieve this?

Regards,
Rajesh.

On Wed, Apr 13, 2011 at 11:09 AM, Nathanael D. Noblet <nathanael at gnat.ca>wrote:

> On 04/11/2011 09:13 AM, Nathanael D. Noblet wrote:
>
>> Hello,
>>
>> So using the examples from the source in avahi I've been able to get my
>> one app to see when a new service comes online that I'm interested in.
>> However I'm confused about the other use-case, mainly when a client goes
>> offline. It doesn't provide enough information to know which host
>> disappeared...
>>
>>  From the example browse_callback you get the event (failure, new,
>> remove etc) in the case of new you resolve it to a host. Is there any
>> way in the REMOVE case to determine the source (IP, hostname or any
>> other identifying). The reason being is that my app is an
>> 'administration' app, so has a list of configured hosts, and avahi is
>> used to know when they are accessible. So when a host starts the service
>> I can see it and in my host list I mark it as 'online' but when I cancel
>> the service, I can't see a way to mark that host as offline.
>>
>
> So I poked around avahi-discover and got some good ideas so this is all
> working now.
>
> I do however have one more question...
>
> My app registers a service browser looking for one type of service. That
> all works well. The part that doesn't is if my app comes up after a client
> publishing that service. To reproduce here's what I do...
>
>
>   Browser              |    Client
> ========================|===========================
> Start Browser App       |
>                        | Start published service
> App sees it             |
>                        | Stop published service
> App sees it removed     |
>                        | Start published service
> App sees it             |
> Close app               |
> Wait a bit              |
>                        |
> Start Browser App       |
>                        |
> Receive resolve failure |
>
>
> How do I fix it so that it still resolves? I'll keep poking around to see
> what other apps do, but thought I'd ask.
>
>
>
> --
> Nathanael d. Noblet
> t 403.875.4613
> _______________________________________________
> avahi mailing list
> avahi at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/avahi
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/avahi/attachments/20110413/c6c757b9/attachment.htm>


More information about the avahi mailing list