module type IO =sig
..end
type 'a
t
'a
.type
chan_endpoint
type
chan =
| |
Chan : |
(* |
A channel consists of two
Binary_session.IO.chan_endpoint . | *) |
val make_channel : unit -> chan
val read_channel : chan_endpoint -> 'a t
read_channel end_point
reads a marshalled value from end_point
and returns it.val write_channel : 'a ->
flags:Marshal.extern_flags list ->
chan_endpoint -> unit t
write_channel v flags end_point
marshals the value v
according to flags
and writes it to end_point
.val close_channel : chan -> unit t
close_channel c
will close the given channel c
.val return : 'a -> 'a t
return v
creates a light weight thread returning v
.val (>>=) : 'a t ->
('a -> 'b t) -> 'b t
bind t f
is a thread which first waits for the thread t
to terminate and then, behaves as the application of
function f
to the return value of t
.