swift-dns-service-discovery icon indicating copy to clipboard operation
swift-dns-service-discovery copied to clipboard

DNS-SD (Bonjour/Zeroconf/Avahi) implementation of the Swift Service Discovery API

Swift DNS Service Discovery

Build

An implementation of the Swift Service Discovery API using DNS-based Service Discovery (DNS-SD), also known as Bonjour, Zeroconf or Avahi.

Uses the dns_sd library, which on macOS/Windows is provided by Bonjour and on Linux requires the Avahi compatibility layer. On Ubuntu, the following package can be used:

sudo apt install libavahi-compat-libdnssd-dev

Credits

The library draws inspiration from

  • https://github.com/nallick/dns_sd, a high-level Swift wrapper of dns_sd
    • MIT-licensed (Copyright (c) 2019 Purgatory Design).
  • https://github.com/rhx/CDNS_SD, a simpler Swift system library wrapper for dns_sd
    • BSD-2-licensed (Copyright (c) 2016, Rene Hexel)

The following documentation on the dns_sd library was also incredibly helpful: