Reputation: 3476
I have an avahi (zeroconf, dnssd, bonjour) service. I want the service to be able to notify the clients when it has new data so the clients can then connect and query for the updated information.
What type of message should the service publish, and how is this done with the avahi API (service is written in C++)?
Upvotes: 3
Views: 1290
Reputation: 13079
I don't know what C++ API you are refering to, but this is how you do it in the C-layer. You can use the following functions in avahi to update the TXT record of the service.
avahi_entry_group_update_service_txt (AvahiEntryGroup *g, ...)
avahi_entry_group_update_service_txt_strlst (AvahiEntryGroup *g, ...)
Listening clients will receive a service updated event.
Upvotes: 1