mjansson / mdns

Public domain mDNS/DNS-SD library in C
The Unlicense
470 stars 120 forks source link

Extraction of records from multi-record answers #12

Closed murifex closed 4 years ago

murifex commented 4 years ago

Hello,

first, i'm not sure if I'm doing something wrong or your code is intended to be used differently.

But as far as i can tell, if an answer to a query is received using mdns_discovery_recv in a while-loop, as in your example query_callback is called only once. However, I don't see a method to extract the information of other than the first record in that callback.

mjansson commented 4 years ago

The callback passed to the discovery recv function will be called once for each matching record in the answer (and additional records)