[avahi] How could I create an AVAHI client & server using C++?
jorgeas80 at gmail.com
Fri Apr 11 00:45:44 PDT 2014
I'm coding a C++ library that, among other things, needs to:
- Search for a specific service in a network using AVAHI
- Publish itself as a service using AVAHI
I've been searching for existent options. I've found that the creators of
POCO C++ offer a DNS-SD library integrated with POCO C++ . That would
work, because I'm actually using POCO C++, but it's a commercial library,
and I can't afford it.
Apart from that, avahi-daemon offers a client interface that allows browsing
services and publishing new ones. It also sounds good, but I need my code to
be portable, and work in major Linux distributions, Mac OS X and Windows.
AFAIK, this solution would only cover Linux (where avahi-daemon is
I guess as partial solution, I could just send a properly formatted message
via socket and process the raw response. That way, I could search for
services published using AVAHI. But I think that's ugly and unmaintainable.
So, is there any good-enough solution for this without buying a software? I
know this can be done using Python , but I need to do it in C++.
Many thanks in advance
More information about the avahi