Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
macOS: New implementation of service publication
The current implementation of service publication on macOS uses `avahi-client`, but the majority of macOS machines do not have Avahi installed because macOS provides a native alternative (`mDNSresponder`), meaning that there is no reason to install Avahi. The current implementation also attempts to load the Avahi client libraries using `dlopen(3)`, which has a variety of restrictions on macOS, such as only being willing to load from certain directories. Depending on where the Avahi binaries are installed, they might not be loadable through the current invocation of `dlopen(3)`. Instead of using an Avahi client on macOS, it makes more sense to use the native macOS API for publishing services via `mDNSresponder`. This commit supplies such an implementation that uses the macOS native API. It also has the advantage of being much simpler than the previous implementation. Furthermore, this new implementation works on all macOS machines, because it relies only on native APIs, rather than on third-party software that is not commonly installed on macOS.
- Loading branch information