[avahi] 1 avahi_simple_poll_loop for 2 (or more) servicetype?
Lennart Poettering
lennart at poettering.net
Thu Apr 2 09:22:30 PDT 2009
On Tue, 31.03.09 15:13, Florian Erfurth (f.erfurth at reel-multimedia.com) wrote:
> Hi,
> I successfully wrote a small tool which get strings (txt-record) from a
> Host and keep uptodate (if Host changed Text, Client will get new text).
> For this purpose I use type "_boxMySQL._tcp".
> The host does have other service-type too, called "_boxAVG._tcp". I want
> keep a list of Hosts with such service and add/remove Host to/from list
> (with AVAHI_BROWSER_NEW/ AVAHI_BROWSER_REMOVE). Now I've got a question.
> Is this possible to do both in same poll_loop? I've tried
> avahi_service_browser_new() with "_box*._tcp", but it didn't work. :(
> Do I need 2 different poll_loop (one for "_boxMySQL._tcp" and other for
> "_boxAVG._tcp")?
You can add as many browsers/resolvers to a single event loop object as
you wish. Use one browser per service type.
Lennart
--
Lennart Poettering Red Hat, Inc.
lennart [at] poettering [dot] net ICQ# 11060553
http://0pointer.net/lennart/ GnuPG 0x1A015CC4
More information about the avahi
mailing list