module Uq_resolver:Support for pluggable resolverssig
..end
The plugin mechanism allows one to change the name resovler Ocamlnet
uses. Resolvers can be both synchronous or asynchronous. Note however,
that the default resolver is synchronous and simply bases on
Unix.gethostbyname
.
Asynchronous Interface
The following types are the same as in Uq_engines
, here only
redefined for systematic reasons
type'a
engine_state =[ `Aborted | `Done of 'a | `Error of exn | `Working of int ]
class type['a]
engine =object
..end
exception Host_not_found of string
class type resolver =object
..end
val get_host_by_name : ?resolver:resolver -> string -> Unix.host_entry
Host_not_found
.
If a resolver
is passed, this resolver is used, otherwise the
pluggable resolver is used.
val current_resolver : unit -> resolver
val set_current_resolver : resolver -> unit