module Lwt_bytes:sig..end
typet =(char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t
val create : int -> tval length : t -> intval get : t -> int -> charget buffer offset returns the byte at offset offset in
buffer.val set : t -> int -> char -> unitget buffer offset value changes the value of the byte at
offset offset in buffer to value.val unsafe_get : t -> int -> charLwt_bytes.get but without bound checking.val unsafe_set : t -> int -> char -> unitLwt_bytes.set but without bound checking.val of_string : string -> tof_string str returns a newly allocated byte array with the
same contents as str.val to_string : t -> stringto_string buf returns a newly allocated string with the same
contents as buf.val blit : t -> int -> t -> int -> int -> unitblit buf1 ofs1 buf2 ofs2 len copy len bytes from buf1
starting at offset ofs1 to buf2 starting at offset ofs2.val blit_string_bytes : string -> int -> t -> int -> int -> unitval blit_bytes_string : t -> int -> string -> int -> int -> unitval unsafe_blit : t -> int -> t -> int -> int -> unitLwt_bytes.blit but without bound checking.val unsafe_blit_string_bytes : string -> int -> t -> int -> int -> unitLwt_bytes.blit_string_bytes but without bound checking.val unsafe_blit_bytes_string : t -> int -> string -> int -> int -> unitLwt_bytes.blit_bytes_string but without bound checking.val proxy : t -> int -> int -> tproxy buffer offset length creates a ``proxy''. The returned
byte array share the data of buffer but with different
bounds.val extract : t -> int -> int -> textract buffer offset length creates a new byte array of
length length and copy the length bytes of buffer at
offset into it.val copy : t -> tcopy buffer creates a copy of the given byte array.val fill : t -> int -> int -> char -> unitfill buffer offset length value puts value in all length
bytes of buffer starting at offset offset.val unsafe_fill : t -> int -> int -> char -> unitLwt_bytes.fill but without bound checking.Lwt_unix except that they use byte arrays instead of
strings.val read : Lwt_unix.file_descr -> t -> int -> int -> int Lwt.tval write : Lwt_unix.file_descr -> t -> int -> int -> int Lwt.tval recv : Lwt_unix.file_descr ->
t -> int -> int -> Unix.msg_flag list -> int Lwt.tval send : Lwt_unix.file_descr ->
t -> int -> int -> Unix.msg_flag list -> int Lwt.tval recvfrom : Lwt_unix.file_descr ->
t ->
int -> int -> Unix.msg_flag list -> (int * Unix.sockaddr) Lwt.tval sendto : Lwt_unix.file_descr ->
t -> int -> int -> Unix.msg_flag list -> Unix.sockaddr -> int Lwt.ttype io_vector = {
|
iov_buffer : |
|
iov_offset : |
|
iov_length : |
val io_vector : buffer:t -> offset:int -> length:int -> io_vectorval recv_msg : socket:Lwt_unix.file_descr ->
io_vectors:io_vector list -> (int * Unix.file_descr list) Lwt.tval send_msg : socket:Lwt_unix.file_descr ->
io_vectors:io_vector list -> fds:Unix.file_descr list -> int Lwt.tval map_file : fd:Unix.file_descr ->
?pos:int64 -> shared:bool -> ?size:int -> unit -> tmap_file ~fd ?pos ~shared ?size () maps the file descriptor
fd to an array of bytes.val mapped : t -> boolmapped buffer returns true iff buffer is a memory mapped
file.type advice =
| |
MADV_NORMAL |
| |
MADV_RANDOM |
| |
MADV_SEQUENTIAL |
| |
MADV_WILLNEED |
| |
MADV_DONTNEED |
val madvise : t -> int -> int -> advice -> unitmadvise buffer pos len advice advise the kernel about how the
program is going to use the part of the memory mapped file
between pos and pos + len.
This call is not available on windows.
val page_size : intval mincore : t -> int -> bool array -> unitmincore buffer offset states tests whether the given pages are
in the system memory (the RAM). The offset argument must be a
multiple of Lwt_bytes.page_size. states is used to store the result;
each cases is true if the corresponding page in the RAM and
false otherwise.
This call is not available on windows.
val wait_mincore : t -> int -> unit Lwt.twait_mincore buffer offset waits until the page containing the
byte at offset offset in the the RAM.
This functions is not available on windows.