Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Howto listen to changes after first query. #68

Open
stefbon opened this issue Jan 11, 2023 · 2 comments
Open

Howto listen to changes after first query. #68

stefbon opened this issue Jan 11, 2023 · 2 comments

Comments

@stefbon
Copy link

stefbon commented Jan 11, 2023

Hi,

implementing this library in my own project, I very much want to know howto listen to changes like a host (with dns services) is showing upp or removed for example.
A socket/fd for every interface has to be listning to this (and watched by an eventloop). And then?

Stef

@stefbon
Copy link
Author

stefbon commented Feb 13, 2023

Can I use the mdns_announce_multicast to let other mdns hosts know my software is interested in announces/goodbyes (==changes in services and/or hosts going down)?

@stefbon
Copy link
Author

stefbon commented Aug 10, 2023

I've found the following: MDNS responders should send an unsolicited Multicast response packet, with the exact same values it would send after a query for services, but then with TTL zero. This enables listning and receiving neighbours to delete the entry from their cache. (see: rfc6762).
Also - when a host is not configured properly, is crashing or is not working according the specs, I think it would be smart to

  • a client to poll on a regular base for services (how often?)
  • a callback to the mdns query software should be enabled when the application has indications a host is down/has become unreachable (for example when connections with this host are shutdown in a non proper way).

Maybe add this in the example software.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant