| File lib/ocaml/pkg-lib/hydro/hydro_marshal.mli | GODI Package godi-hydro |
| Library hydro |
| Hydro_marshal.html | hydro_marshal.cmi_pretty | hydro_marshal.mli | Sources |
(* $Id: hydro_marshal.mli 16195 2008-01-21 22:15:59Z gerd $ *) (** Hydro marshalling *) open Hydro_types val encapsulate : (Netbuffer.t -> int -> unit) -> Netbuffer.t -> int -> unit (** [encapsulate f b e]: Calls [f b] and prepends the encapsulation header. [e] is the minor encoding version. (The major encoding version is always 1.) *) val marshal : system -> htype -> bool -> value -> Netbuffer.t -> int -> unit (** [marshal sys ht class_flag val nb e]: Encodes the value [val] which is supposed to be of type [ht] and appends the string to [nb]. The [class_flag] must be true if [ht] contains classes. Logically, an encapsulation is created, but the encapsulation header is not written. [e] is the minor encoding version. (The major encoding version is always 1.) *) val marshal_exn : system -> hexn -> sliced_value -> Netbuffer.t -> int -> unit (** [marshal_exn sys hx val nb e]: Encodes the exception value [val] which is supposed to be of (static) exn type [hx] and appends the string to [nb]. Logically, an encapsulation is created, but the encapsulation header is not written. [e] is the minor encoding version. (The major encoding version is always 1.) *) val marshal_msg : system -> compression_status -> msg -> int -> int -> msg_buffer (** [marshal_msg sys zstat msg p e]: Returns a message buffer (header and bodies) for a message. [p] is the minor protocol version. [e] is the minor encoding version (which must have been used for all encapsulations). (The major version for protocol and encoding is always 1.) *) val max_proto_minor : int val max_enc_minor : int (** Maximum versions we can support *) val print_short : Netbuffer.t -> int -> unit val print_int : Netbuffer.t -> int -> unit val print_int32 : Netbuffer.t -> int32 -> unit val print_int64 : Netbuffer.t -> int64 -> unit val print_float : Netbuffer.t -> float -> unit val print_double : Netbuffer.t -> float -> unit val print_size : Netbuffer.t -> int -> unit (** Various printers *) (* Internal & Low-level: *) val encoded_int : int -> string