module Control:sig
..end
type 'name
t =
| |
of |
| |
Duplicate of |
| |
Wrong_mode of |
| |
Too_many_clients of |
| |
Almost_full of |
| |
Connect of |
| |
Disconnect of |
| |
Parse_error of |
| |
Protocol_error of |
val bin_size_t : ('a -> int) -> 'a t -> int
val bin_write_t_ : (Bin_prot.Unsafe_common.sptr ->
Bin_prot.Unsafe_common.eptr -> 'a -> Bin_prot.Unsafe_common.sptr) ->
Bin_prot.Unsafe_common.sptr ->
Bin_prot.Unsafe_common.eptr ->
'a t -> Bin_prot.Unsafe_common.sptr
val bin_write_t : (Bin_prot.Unsafe_common.sptr ->
Bin_prot.Unsafe_common.eptr ->
'a -> Bin_prot.Unsafe_common.sptr) ->
Bin_prot.Common.buf ->
pos:Bin_prot.Common.pos ->
'a t -> Bin_prot.Common.pos
val bin_writer_t : 'a Bin_prot.Type_class.writer ->
'a t
Bin_prot.Type_class.writer
val bin_read_t__ : 'a -> 'b -> 'c -> 'd -> 'e
val bin_read_t_ : (Bin_prot.Unsafe_common.sptr_ptr ->
Bin_prot.Unsafe_common.eptr -> 'a) ->
Bin_prot.Unsafe_common.sptr_ptr ->
Bin_prot.Unsafe_common.eptr ->
'a t
val bin_read_t : (Bin_prot.Unsafe_common.sptr_ptr ->
Bin_prot.Unsafe_common.eptr -> 'name) ->
Bin_prot.Common.buf ->
pos_ref:Bin_prot.Common.pos Pervasives.ref ->
'name t
val bin_reader_t : 'a Bin_prot.Type_class.reader ->
'a t
Bin_prot.Type_class.reader
val bin_t : 'a Bin_prot.Type_class.t ->
'a t Bin_prot.Type_class.t
lookup_marshal_fun v
This function takes a version v
, and returns a
function that will downgrade (if necessary) the current version to v
and
then write it to a bigsubstring. It is perfectly fine if one message
becomes zero or more messages as a result of downgrading, this is why the
marshal fun returns a list. The contents of these buffers will be copied
immediatly, so it is safe to reuse the same bigstring for multiple
marshals.lookup_unmarshal_fun v
This function takes a version v
, and returns a
function that unmarshals a message and upgrades it, returning zero or more
messages as a result of the upgrade. The bigsubstring is only guaranteed
to contain valid data until the unmarshal function returns, after which it
may be overwritten immediatly.
If you don't care about modes, just use Dont_care_about_mode.
val __t_of_sexp__ : 'name.
(Sexplib.Sexp.t -> 'name) ->
Sexplib.Sexp.t -> 'name t
val t_of_sexp : 'name.
(Sexplib.Sexp.t -> 'name) ->
Sexplib.Sexp.t -> 'name t
val sexp_of_t : 'name.
('name -> Sexplib.Sexp.t) ->
'name t -> Sexplib.Sexp.t