package dnssd

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

A low-level interface which exposes the Unix domain socket used to talk to the daemon.

type query
val query : string -> Dns.Packet.q_type -> query

query name type creates a query for name and type. This call does not block.

exception Cancelled

Raised if an operation is called on a cancelled query

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