Skip to content

Conversation

@scaprile
Copy link
Collaborator

@scaprile scaprile commented Nov 28, 2025

mg_mdns_listen() signature is changed to the standard mg_*_listen(&mgr, fn, fn_data)
mDNS name can then be specified as fn_data, and fn be NULL.
If fn is not NULL, it is called for every mDNS record request. If fn_data is also not NULL, it is checked before callingfn. So:

  • Passing only fn_data works as before, with the addition of an extra argument, only mDNS, Mongoose replies to a given name
  • Passing fn and fn_data, the user event handler can respond to requests associated to its name, including services, so supporting DNS-SD the easiest way, as Mongoose handles all parsing and response generation; the user only has to match service names to his database.
  • Passing only fn, the user event handler is called for every mDNS request, this allows a more flexible way to do whatever weird handling might be needed, as Mongoose does not check for names

@scaprile scaprile force-pushed the dnssd branch 2 times, most recently from 9c603d5 to 15706d9 Compare November 28, 2025 18:54
@scaprile scaprile requested review from cpq and robertc2000 November 28, 2025 18:58
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

Successfully merging this pull request may close these issues.

2 participants