Up

Module Splice

Signature

Splice flags
type flag =
| MOVE
| NONBLOCK
| MORE
| GIFT

Type of Splice event flag

val bin_read_flag : flag Core.Std.Bin_prot.Read.reader
val __bin_read_flag__ : (int -> flag) Core.Std.Bin_prot.Read.reader
val bin_size_flag : flag Core.Std.Bin_prot.Size.sizer
val bin_write_flag : flag Core.Std.Bin_prot.Write.writer
val flag_of_sexp : Sexplib.Sexp.t -> flag
val sexp_of_flag : flag -> Sexplib.Sexp.t
type flags

Type of Splice event flags

val make_flags : flag array -> flags

make_flags ar

Returns flags constructed from the array of flags ar.
Splice functions
val splice : (?assume_fd_is_nonblocking:bool -> fd_in:Core.Std.Unix.File_descr.t -> ?off_in:int -> fd_out:Core.Std.Unix.File_descr.t -> ?off_out:int -> len:int -> flags -> int * int * int) Core.Std.Or_error.t

splice ?assume_fd_is_nonblocking ~fd_in ?off_in ~fd_out ?off_out ~len flags see man-page for details.

Returns the triple (ret, ret_off_in, ret_off_out), where ret corresponds to the return value of the system call, ret_off_in to the final input offset, and ret_off_out to the final output offset.
Raises [Unix_error] on Unix-errors.
Raises [Invalid_argument] if the offsets or length are invalid
Param [assume_fd_is_nonblocking] default = false
Param [off_in] default = 0
Param [off_out] default = 0
val tee : (?assume_fd_is_nonblocking:bool -> fd_in:Core.Std.Unix.File_descr.t -> fd_out:Core.Std.Unix.File_descr.t -> int -> flags -> int) Core.Std.Or_error.t

tee ?assume_fd_is_nonblocking ~fd_in ~fd_out len flags see man-page for details.

Raises [Unix_error] on Unix-errors.
Raises [Invalid_argument] if the length is invalid
Param [assume_fd_is_nonblocking] default = false
val vmsplice : (?assume_fd_is_nonblocking:bool -> Core.Std.Unix.File_descr.t -> Core.Std.Bigstring.t Core.Std.Unix.IOVec.t array -> ?count:int -> flags -> int) Core.Std.Or_error.t

vmsplice ?assume_fd_is_nonblocking fd iovecs ?count flags see man-page for details.

Raises [Unix_error] on Unix-errors.
Raises [Invalid_argument] if the count is invalid
Param [assume_fd_is_nonblocking] default = false
Param [count] default = Array.length iovecs