Library
Module
Module type
Parameter
Class
Class type
A low-level interface which exposes the Unix domain socket used to talk to the daemon.
val query : string -> Dns.Packet.q_type -> query
query name type
creates a query for name
and type
. This call does not block.
val socket : query -> Unix.file_descr
socket query
returns the underlying Unix domain socket suitable for select()
kqueue
etc. When the socket is readable, response
can be called without blocking (very much). This raises Cancelled
if the query has been cancelled.
val response : query -> (Dns.Packet.rr list, error) Pervasives.result
response query
reads the responses which have arrived for query
. This function will block unless the caller has waited for events on the Unix domain socket. This raises Cancelled
if the query has been cancelled.
val cancel : query -> unit
cancel query
causes an outstanding query to be cancelled and resources freed