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

Support hot plugging #9

Closed brutella closed 3 months ago

brutella commented 5 years ago

Services should be renounced after a new network interface is active.

Currently there is no way to tell if a network interface is operational. net.FlagUp only tells that a network interface is configured and up. Also a network interface can have a valid IP address even though for example no ethernet cable is attached.

Wait until net.FlagRunning is added to Go. https://github.com/golang/go/issues/29991

brutella commented 3 months ago

net.FlagRunning is available since go 1.20

brutella commented 3 months ago

Hot plugging is now supported since version v1.2.12.

brutella commented 3 months ago

I have to mention that observing changes to network interfaces use the netlink API, which is only available on Linux. This means that this feature only works on Linux.