[avahi] How to handle watch events

Nathan Huesken avahi at lonely-star.org
Thu Aug 7 05:54:59 PDT 2008


I have a question regarding AvahiWatch.
- Is it possible to free all AvahiWatch in a AvahiPoll wihtout knowing them?
- How do I call watch_new and watch_free? Like this:

AvahiWatch w=avahi_poll->watch_new(avahi_poll, ...);

Is that correct?
- If I want to watch a socket for reading, writing error and closed connection, do I have to add 4 watch events like:
AvahiWatch read=avahi_poll->watch_new(avahi_poll, AVAHI_WATCH_IN, ...)
AvahiWatch write=avahi_poll->watch_new(avahi_poll, AVAHI_WATCH_OUT, ...)
AvahiWatch error=avahi_poll->watch_new(avahi_poll, AVAHI_WATCH_ERROR, ...)
AvahiWatch close=avahi_poll->watch_new(avahi_poll, AVAHI_WATCH_HUB, ...)


More information about the avahi mailing list