Closed RyanGibb closed 1 year ago
Dear Ryan,
DNS messages contain an ID to match replies with queries. In Dns_client_lwt
this is used to match incoming replies with queries sent out. The reply is bubbled back through a Lwt_condition.t
stored in a map:
This line extracts the ID of the TCP DNS query message.
For Dns_client_unix
a query is sent out and the call blocks until a reply is sent back. Concurrent requests are not expected, and I believe this is why send_recv
in Dns_client_unix
doesn't try to do any query ID / reply ID matching.
The documentation could be clearer about this - what do you think?
Dear Reynir,
Ah yes, I missed that for the lwt and mirage clients. That makes sense! Thanks for pointing it out.
Perhaps the documentation could be a bit clearer. It's not completely apparent that the decision about what behavior this function exhibits differs between implementations.
Hi,
I noticed that
Transport.send_recv
is used inDns_client
, which seems to take the first received packet after sending a packet as the response, and I was wondering if you've considered how out of order delivery could effect this when making concurrent requests?Thanks, -- Ryan