Library and tools for creating forwarding DNS servers
Module type Dns_forward . Flow . Server
type server
type address
val bind : address -> server Error.t

Bind a server to an address

val getsockname : server -> address

Query the address the server is bound to

type flow
val listen : server -> ( flow -> unit Lwt.t ) -> unit

Accept connections forever, calling the callback with each one. Connections are closed automatically when the callback finishes.

val shutdown : server -> unit Lwt.t

Stop accepting connections on the given server