package lwt
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=d0f824f75ce5297975aec75366fed36c
sha512=c43fff2e9e808dc49ddf09caf7040e512ba36aebe2c600d524095ced11c196c3ac619953a11cb3e3a9f7c6c99e798d43bf179d5f790ab258fb9f746fae4c1125
doc/lwt.unix/Lwt_unix/IO_vectors/index.html
Module Lwt_unix.IO_vectorsSource
Sequences of buffer slices for writev.
Mutable sequences of I/O vectors. An I/O vector describes a slice of a 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 abbreviation equivalent to Lwt_bytes.t. Do not use this type name directly; use Lwt_bytes.t instead.
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.
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.
drop vs n adjusts the I/O vector sequence vs so that it no longer includes its first n bytes.
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.
Some systems limit the number of I/O vectors that can be passed in a single call to their 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.