module IO_vectors:sig
..end
Lwt_unix.writev
.type
t
bytes
or Bigarray
buffer. Each I/O vector is a triple containing a
reference to the buffer, an offset into the buffer where the slice begins,
and the length of the slice.type_bigarray =
(char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t
Lwt_bytes.t
. Do not use this type name
directly; use Lwt_bytes.t
instead.val create : unit -> t
val append_bytes : t -> bytes -> int -> int -> unit
append_bytes vs buffer offset length
appends a slice of the bytes
buffer buffer
beginning at offset
and with length length
to the
I/O vector sequence vs
.val append_bigarray : t -> Lwt_unix.IO_vectors._bigarray -> int -> int -> unit
append_bigarray vs buffer offset length
appends a slice of the
Bigarray
buffer buffer
beginning at offset
and with length length
to the I/O vector sequence vs
.val drop : t -> int -> unit
drop vs n
adjusts the I/O vector sequence vs
so that it no longer
includes its first n
bytes.val is_empty : t -> bool
is_empty vs
is true
if and only if vs
has no I/O vectors, or all I/O
vectors in vs
have zero bytes.val system_limit : int option
writev
or readv
system calls. On those systems,
if the limit is n
, this value is equal to Some n
. On systems without
such a limit, the value is equal to None
.
Unless you need atomic I/O operations, you can ignore this limit. The Lwt
binding automatically respects it internally. See Lwt_unix.writev
.
A typical limit is 1024 vectors.