https://github.com/fwcd/swift-dns-service-discovery
DNS-SD (Bonjour/Zeroconf/Avahi) implementation of the Swift Service Discovery API
https://github.com/fwcd/swift-dns-service-discovery
avahi bonjour dns dns-sd mdns swift swift-service-discovery zeroconf
Last synced: over 1 year ago
JSON representation
DNS-SD (Bonjour/Zeroconf/Avahi) implementation of the Swift Service Discovery API
- Host: GitHub
- URL: https://github.com/fwcd/swift-dns-service-discovery
- Owner: fwcd
- License: mit
- Created: 2023-08-11T11:19:01.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-26T19:29:06.000Z (about 2 years ago)
- Last Synced: 2025-03-28T10:11:39.153Z (over 1 year ago)
- Topics: avahi, bonjour, dns, dns-sd, mdns, swift, swift-service-discovery, zeroconf
- Language: Swift
- Homepage: https://fwcd.github.io/swift-dns-service-discovery/documentation/dnsservicediscovery
- Size: 296 KB
- Stars: 29
- Watchers: 5
- Forks: 4
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Swift DNS Service Discovery
[](https://github.com/fwcd/swift-dns-service-discovery/actions/workflows/build.yml)
[](https://fwcd.github.io/swift-dns-service-discovery/documentation/dnsservicediscovery)
An implementation of the [Swift Service Discovery API](https://github.com/apple/swift-service-discovery) using [DNS-based Service Discovery (DNS-SD)](https://en.wikipedia.org/wiki/Zero-configuration_networking#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:
```sh
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:
- [Apple's documentation archive](https://developer.apple.com/library/archive/documentation/Networking/Conceptual/dns_discovery_api/Articles/browse.html#//apple_ref/doc/uid/TP40002486-SW1), describing the low-level DNS-SD API
- [DNS Service Discovery on Windows](https://marknelson.us/posts/2011/10/25/dns-service-discovery-on-windows.html), providing an example-oriented overview of the library and an explanation of how the callbacks are driven