commfn value describes the means by which datagram
transmission and reception occur as well as providing functions to
timeout requests and clean up any resources used.
val resolve_pkt : (module Dns.Protocol.CLIENT) -> ?alloc:(unit -> Dns.Buf.t) -> commfn -> Dns.Packet.t -> Dns.Packet.t Lwt.t
resolve_pkt client ?alloc commfn packet will attempt resolution
of the query contained in
packet via the protocol client
client and using the utilities of
alloc may be
provided to control how buffers are allocated.
client may issue multiple network transactions for the same
query simultaneously. The first received successful response will
be returned. If no responses are successful or received before
commfn.timerfn resolves, the Lwt.t value will fail with a
Dns.Protocol.Dns_resolve_error exception which contains a list
of all of the errors encountered during resolution.
val resolve : (module Dns.Protocol.CLIENT) -> ?alloc:(unit -> Dns.Buf.t) -> ?dnssec:bool -> commfn -> Dns.Packet.q_class -> Dns.Packet.q_type -> Dns.Name.t -> Dns.Packet.t Lwt.t
resolve client ?alloc ?dnssec commfn q_class q_type name will
construct a query packet from
name and then attempt to resolve it by calling resolve_pkt.