Module Tjr_net.Net_intf

Basic network types: addresses, errors etc

The Generic code consumes a set of network operations, and produces a set of message lib operations. This code was really an experiment to try to abstract over Stdlib.Unix (no monad) and Lwt_unix.

Address types

type inet_addr = Unix.inet_addr
type port = int
type endpt = Unix.sockaddr

expect ADDR_INET ip * port

type endpt_pair = {
local : endpt;
remote : endpt;
}

A pair of endpoints, local and remote

Net error types

module Net_err : sig ... end

Underlying network operations

type ('a, 'b) r_ = ('a'b) Stdlib.result
module Make_net_ops : functor (S : sig ... end) -> sig ... end

Msg error types

module Msg_err : sig ... end

Msg-lib operations

module Make_msg_ops : functor (S : sig ... end) -> sig ... end

Monad sig

module type MONAD = sig ... end

Monad intf