module Site:sig
..end
Sites must be compared with the equal
and compare
functions
of this module. Sites are useful for performing crude failure detection
(See Join.Site.at_fail
below).
type
t
val here : t
val there : Unix.sockaddr -> t
Failure
if the connection cannot be established.val listen : Unix.sockaddr -> unit
Failure
in case of failure.val where_from : 'a Join.chan -> t
where_from c
returns the identity of the remote site where reception
on channel c
takes place.val equal : t -> t -> bool
val compare : t -> t -> int
val at_fail : t -> unit Join.chan -> unit
at_fail s c
registers channel c
as a guard on failure of site s
.
If s
failure is detected, a message () is sent on channel c
.
At the moment, site failure detection is
a bit unsafe, due to naive routing.
A failure may express the impossibility to contact a remote site for
the first time.
val get_local_addr : unit -> Unix.inet_addr
get_local_addr ()
returns the loopback
address Unix.inet_addr_loopback