<div dir="ltr">I've built a simple command line application in C which uses libdns to make periodic DNS queries to the authoritative name servers of multiple domains. Ensuring the periodicity of the queries is important, following a user-defined query_interval (in seconds). <div><br></div><div>As far as I could tell, libdns only allows for request-response calls: the functions which start DNS queries also return the DNS response, blocking until a response is received. Because of this, I've implemented a key part of the application in a naive way within a while() cycle: </div><div><ol><li>I do a block of queries</li><li>Take note of the time taken by the query block (query_time)</li><li>sleep(query_interval - query_time)</li><li>Go back to 1 <br></li></ol><div>I think this is sloppy. A better option would be to have separate send/receive threads. This way, the periodicity of the query blocks wouldn't be affected by the duration of the request-response cycles. But for that I would need libdns functions with separate send()- and recv()-like interfaces, which I couldn't find in the documentation, greps in the source folders, nor examples. </div><div><br></div><div>Have I missed something? <b>Are there send()- and recv()-like interfaces in libdns?</b><br></div></div><div><b><br></b></div><div>Thanks in advance!</div><div><br></div><div>Best regards,</div><div>Antonio</div><div><b><br></b></div></div>