brutella / dnssd

This library implements Multicast DNS (mDNS) and DNS-Based Service Discovery (DNS-SD) for Zero Configuration Networking in Go.
MIT License
207 stars 33 forks source link

How to get hostname and port from a browse? #29

Closed chinenual closed 2 years ago

chinenual commented 3 years ago

I am trying to update my code to use the new 1.2.0 version of the library (was using 1.1.1). browse.go has changed to use BrowseEntry's instead of Service objects. I can't find a way to get the Hostname and Port of the browsed service in my addFunc. None of the relevant example cmd programs (e.g., cmd/browse, cmd/resolve) appear to print hostname or port for the discovered services.

Help?

cmaglie commented 3 years ago

Having the exact same problem, this is a breaking change and should be published as a 2.x.x version.

xpol commented 3 years ago

I have to add the Port on my own https://github.com/xpol/dnssd/commit/49b7f45221b2f645f74b46af40a0ed39a4ad20a7