An mDNS Discovery Mechanism for registering, and discovering, libp2p services, and peers, on a local area network.
dnssd
library on mac/ios systems.mDNS helps you discover libp2p peers on a local network without pre-configuring ip addresses and port numbers.
dnssd
library and doesn't work on Linux at the moment.Include the following dependency in your Package.swift file
let package = Package(
...
dependencies: [
...
.package(url: "https://github.com/swift-libp2p/swift-libp2p-mdns.git", .upToNextMajor(from: "0.0.1"))
],
...
.target(
...
dependencies: [
...
.product(name: "LibP2PMDNS", package: "swift-libp2p-mdns"),
]),
...
)
TODO
import LibP2PMDNS
/// When you configure your app
app.discovery.use(.mdns)
N/A
Contributions are welcomed! This code is very much a proof of concept. I can guarantee you there's a better / safer way to accomplish the same results. Any suggestions, improvements, or even just critques, are welcome!
Let's make this code better together! 🤝
MIT © 2022 Breth Inc.
link |
Stars: 2 |
Last commit: 1 year ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics