Hi. I had sent a message on IRC asking about using Avahi (writ large) with libevent, and Trent responded, suggesting I take a look at either the glib-watch code, or else the libevent glue here:
https://raw.githubusercontent.com/ejurgensen/forked-daapd/master/src/mdns_avahi.c and that was actually good advise. I did a quick rewrite (in progress, needs headers, etc) here: https://github.com/pprindeville/avahi/commit/8d5441deb04ba4a38be0b4ffe5c0500987cf4431 which I’ll eventually be turning into a PR. But after doing that, I went back to look at the part of Avahi I wanted to use: avahi-compat-libdns_sd/compat.c and in particular, calling DNSServiceRegister()… alas, the polling is hard-coded: if (!(sdref->client = avahi_client_new(avahi_simple_poll_get(sdref->simple_poll), 0, reg_client_callback, sdref, &error))) { ret = map_error(error); goto finish; } so the time spent on writing the libevent glue for Avahi might have been in vain, unless I can figure out another way to send mDNS announcements (i.e. service registrations) from a libevent-centric program without too much trouble. Anyone have suggestions on how to do this? Thanks, -Philip _______________________________________________ avahi mailing list avahi@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/avahi