Module Aio

module Aio: sig .. end
libaio-ocaml Linux async I/O interface for ocaml

This module implements the libaio bindings that interface with the Linux system calls.

Version 0.0.0 - goswin-v-b@web.de



module Buffer: sig .. end
type result = 
| Result of Buffer.t
| Errno of int
| Partial of Buffer.t * int (*The type for a result of a completed I/O request*)
exception Error of int
An error has occured during a request.
exception Incomplete of Buffer.t * int
A request was only partialy completed.
val result : result -> Buffer.t
Extract the Buffer.t from a result or throw the proper exception
type context 
The type for a libaio Context.
val context : int -> context
Create a new context for n simultaneous requests.
val read : context ->
Unix.file_descr -> int64 -> Buffer.t -> (result -> unit) -> unit
fill buffer from file at given offset and call continuation
val write : context ->
Unix.file_descr -> int64 -> Buffer.t -> (result -> unit) -> unit
write buffer to file at given offset and call continuation
val poll : context -> Unix.file_descr -> int -> (Unix.file_descr -> unit) -> unit
poll file descriptor and call continuation
val run : context -> unit
run the context till there are no more pending requests
val process : context -> unit
process finished events and return
val fd : context -> Unix.file_descr
return eventfd associated with the context
val sync_read : Unix.file_descr -> int64 -> Buffer.t -> unit
fill buffer from file at given offset, blocking
val sync_write : Unix.file_descr -> int64 -> Buffer.t -> unit
write buffer to file at given offset, blocking