Zeroconf icon indicating copy to clipboard operation
Zeroconf copied to clipboard

Unable to determine network interface of discovered service

Open owaits opened this issue 1 year ago • 1 comments

I may have missed something but I can not find a way to determine the network interface of a discovered service when the device has multiple network interfaces.

For our application we need to know the interface to ensure we can open a TCP connection to the discovered service on the correct network adapter.

Looking at the code it would seem simple to expose this information with some simple changes.

owaits avatar Jan 09 '25 11:01 owaits

It appears you can use ListenForAnnouncementsAsync() instead of Resolve() and this gives you the network adapter. However you need to make sure your filter the service you need using the protocol string.

It would be nice if this was documented and perhaps an overload that allows you to provide a protocol filter.

owaits avatar Feb 04 '25 17:02 owaits