[avahi] Integrating Avahi into an application with "select" in the main loop
avahi at lonely-star.org
Tue Aug 5 05:27:26 PDT 2008
I am new to avahi and I am a little unsure about how to integrate it into an existing application.
What I have to do, is call "avahi_simple_poll_iterate" on regular intervalls, correct?
Now the application I want to integrate avahi into mainly sits on a "select".
So I would have to replace my select with:
Which means, that I have to set the timeout for select and avahi_simple_poll_iterate to something low.
Since the main point in avahi is, sitting on a "poll", I wonder if I could just integrate this poll into my select.
Should work, should it not?
But avahi is mainly used by programs providing network services, and normaly these always sit in "select", correct?
So what I am doing here is a common case and I wonder if there is a common way (easier than integrating the to polls by hand) for this?
What do other applications do?
More information about the avahi