Library and tools for creating forwarding DNS servers
Module Dns_forward . Rpc . Server . Make


module Flow : Flow.Server with type address = Ipaddr.t * int
module Framing : Framing.S with type flow = Flow.flow


type server

A Remote Procedure Call server which will listen on an address, accept incoming connections and answer them

type request = Cstruct.t

A complete request

type response = Cstruct.t

A complete response

type address = Config.Address.t

The address of the server

val bind : address -> server Error.t

Bind to the given address. This will fail if the address does not exist or if another server is already bound there.

val listen : server -> ( request -> response Error.t ) -> unit Error.t

Listen and accept incoming connections, use the provided callback to answer requests.

val shutdown : server -> unit Lwt.t

Shutdown the server and free any allocated resources.