Utility functions for marshalling to and from bigstring
include module type of sig ... end
val marshal_blit : ?flags:Marshal.extern_flags Core_kernel__.Import.list ‑> 'a ‑> ?pos:Core_kernel__.Import.int ‑> ?len:Core_kernel__.Import.int ‑> Core_kernel.Bigstring.t ‑> Core_kernel__.Import.int
val marshal : ?flags:Marshal.extern_flags Core_kernel__.Import.list ‑> 'a ‑> Core_kernel.Bigstring.t
val marshal_data_size : ?pos:Core_kernel__.Import.int ‑> Core_kernel.Bigstring.t ‑> Core_kernel__.Import.int
val unmarshal : ?pos:Core_kernel__.Import.int ‑> Core_kernel.Bigstring.t ‑> 'a
val unmarshal_next : ?pos:Core_kernel__.Import.int ‑> Core_kernel.Bigstring.t ‑> 'a * Core_kernel__.Import.int
val skip : ?pos:Core_kernel__.Import.int ‑> Core_kernel.Bigstring.t ‑> Core_kernel__.Import.int
val marshal_to_fd : ?buf:Core__.Import.Bigstring.t ‑> ?flags:Marshal.extern_flags list ‑> Unix.file_descr ‑> 'a ‑> unit
marshal_to_fd ?buf fd v
marshals data v
to file descriptor fd
using marshalling buffer buf
, and marshalling flags flags
.
Raises input errors as in Bigstring.really_write.
buf
cannot hold enough data for marshalling.
val marshal_to_sock_no_sigpipe : (?buf:Core__.Import.Bigstring.t ‑> ?flags:Marshal.extern_flags list ‑> Unix.file_descr ‑> 'a ‑> unit) Core__.Import.Or_error.t
marshal_to_sock_no_sigpipe ?buf sock v
same as marshal_to_fd, but
writes to sockets only and uses Bigstring.really_send_no_sigpipe
to avoid SIGPIPE
on sockets.
val unmarshal_from_sock : ?buf:Core__.Import.Bigstring.t ‑> Unix.file_descr ‑> 'a
unmarshal_from_sock ?buf sock
unmarshals data from socket sock
using unmarshalling buffer buf
. Raises input errors as in
Bigstring.really_recv.
buf
cannot hold enough data for unmarshalling.