Hot take, #P2P protocols shouldn't use MDNS for peer discovery if they don't plan to use the OS provided APIs for it. Only one process can reliably bind the UDP port necessary for it and it quickly leads to conflicts. At the very least you should use a custom port to avoid conflicting with the OS.
@T_X I doubt the os impl would be all that different from libraries. Mdns is a pretty straightforward spec. The main thing to be weary of is conflicts with the OS since only one socket can bind to a given port for multicast udp. Meant that macos was very unreliable when software chose to bundle it's own
@T_X Jeeze that seems excessive. Imo you should just announce one network changes and initial lookup. unsure if os does rate limits though. Maybe I'll put together some sort of universal os level mdns thing one of these days
@mauve I was wondering if maybe overhead were lower when using the OS API because it might aggregate information in one packet? Also, for instance for #snapcast on my Debian right now I see an IPv4 #mDNS query from snapclient every second. So maybe people using the library instead of OS API might use inappropriately short intervals, too, creating more network overhead than necessary?