apache / celix

Apache Celix is a framework for C and C++14 to develop dynamic modular software applications using component and in-process service-oriented programming.
https://celix.apache.org/
Apache License 2.0
158 stars 84 forks source link

Discovery Zeroconf Portability #718

Open PengZheng opened 5 months ago

PengZheng commented 5 months ago

Intro

Currently, discovery_zeroconf only builds with Conan on Linux. Initially, it is targeted at Embedded Linux, and thus depends on the most lightweight feature-complete implementation of dns-sd, a.k.a mDNSResponder. Unfortunately, most (if not all) Linux distributions provide the same functionality with avahi rather than mDNSResponder and mDNSResponder does not build on macOS.

Linux

Note that avahi provides the original Bonjour API as avahi-compat-libdns_sd, it should be possible to make discovery_zeroconf work with avahi. Though for tests to work, it may require additional efforts, see #618.

macOS

Note that dns-sd has first class citizen support on macOS: check this for the official documentation of the C API. Though without a mac at hand, I'm fairly optimistic that discovery_zeroconf could be made to work on macOS.