Module Webs_unix

Webs Unix tooling.

File descriptors

module Fd : sig ... end

File descriptor tools.

HTTP-date

val http_date_of_posix_time_s : float -> string

http_date_of_posix_time_s t is an HTTP-date of posix time t, like returned by Unix.gettimeofday.

Missing Unix bindings

sendfile(2)

val sendfile : src:Unix.file_descr -> off:int -> length:int -> Unix.file_descr -> int

sendfile ~src ~off ~len dst writes length bytes starting at off in src to dst. Raises Unix.Unix_error, you'll also need to do the Unix.EINTR dance. Raises Sys_error if unsupported on the platform.

val really_sendfile : src:Unix.file_descr -> off:int -> length:int -> Unix.file_descr -> unit

really_sendfile is like sendfile except it does the Unix.EINTR dance and falls back to a user space copy if sendfile is unsupported on the platform.

Monotonic time

module Time : sig ... end

Measuring time.