pion / mdns

Pure Go implementation of Multicast DNS
https://pion.ly/
MIT License
187 stars 32 forks source link

Feature request: publishing "services" #206

Open darkvertex opened 2 weeks ago

darkvertex commented 2 weeks ago

Summary

Beyond resolving hosts, mDNS also allows broadcasting so-called "services". This is handy for doing autodiscovery mechanisms. It's the way devices like printers and Chromecasts advertise that they exist in your wifi.

Motivation

Other libraries are not pure Go and require talking to the Avahi Daemon or mapping a socket over a volume when used from a container, which makes it annoying to use in Windows as you are forced to use WSL and litter the host with avahi.

Describe alternatives you've considered

I looked at hashicorp's library which is supposed to permit this, but development seems to be dead and I was not able to get it to publish services in Windows despite their examples not erroring. 🤔

alinke commented 2 weeks ago

+1 to be able to resolve mDNS services, I have the same use case. @darkvertex this lib actually does that and works with Windows github.com/cpuchip/zeroconf/v2. I am using it now in my code but it does not work well for cross platform across mobile devices (am using the fyne framework for a mobile app) and was thinking to try this one instead but I don't see how it can discovery the services. This addition would be great if possible.