Index of values

A
abort [Uwt_io]

abort ch abort current operations and close the channel immediately.

accept [Uwt.Pipe]

initializes a new client, accepts and returns it.

accept [Uwt.Tcp]

initializes a new client, accepts and returns it.

accept_exn [Uwt.Pipe]
accept_exn [Uwt.Tcp]
accept_ipc [Uwt.Pipe]

Used to receive handles over IPC pipes.

accept_raw [Uwt.Pipe]
accept_raw [Uwt.Tcp]
accept_raw_exn [Uwt.Pipe]
accept_raw_exn [Uwt.Tcp]
access [Uwt_compat.Lwt_unix]

Check that the process has the given permissions over the named file.

access [Uwt_base.Fs_functions]

Check user's permissions for a file

at_exit [Uwt.Main]

at_exit hook adds hook at the left of exit_hooks

atomic [Uwt_io]

atomic f transforms a sequence of io operations into one single atomic io operation.

auto_yield [Uwt_compat.Lwt_unix]

auto_yield timeout returns a function f that will yield every timeout seconds.

B
bind [Uwt.Pipe]

Bind the pipe to a file path (Unix) or a name (Windows).

bind [Uwt.Udp]

Bind the UDP handle to an IP address and port.

bind [Uwt.Tcp]

Bind the handle to an address and port.

bind_exn [Uwt.Pipe]
bind_exn [Uwt.Udp]
bind_exn [Uwt.Tcp]
blit [Uwt_bytes]

blit buf1 ofs1 buf2 ofs2 len copy len bytes from buf1 starting at offset ofs1 to buf2 starting at offset ofs2.

blit_from_bytes [Uwt_bytes]

Same as blit but the first buffer is a string instead of a byte array.

blit_to_bytes [Uwt_bytes]

Same as blit but the second buffer is a string instead of a byte array.

block [Uwt_io]

block ch size f pass to f the internal buffer and an offset.

buffer_size [Uwt_io]

Returns the size of the internal buffer.

buffered [Uwt_io]

buffered oc returns the number of bytes in the buffer

C
call [Uwt.C_worker]
change [Uwt_timeout]

changes the duration of a timeout.

chars_of_file [Uwt_io]

chars_of_file name returns a stream of all characters of the file with name name.

chars_to_file [Uwt_io]

chars_to_file name chars writes all characters of chars to name

chdir [Uwt_compat.Lwt_unix]

Change the process working directory.

chdir [Uwt_base.Misc]

Changes the current working directory.

chdir [Uwt.Unix]

Change the process working directory.

chmod [Uwt_compat.Lwt_unix]

Change the permissions of the named file.

chmod [Uwt_base.Fs_functions]

Change the permissions of the named file.

chmod [Uwt.Pipe]

Alters pipe permissions, allowing it to be accessed from processes run by different users.

chmod_exn [Uwt.Pipe]
chown [Uwt_compat.Lwt_unix]

Change the owner uid and owner gid of the named file.

chown [Uwt_base.Fs_functions]

Change the owner ~uid and owner ~gid of the named file.

chroot [Uwt_compat.Lwt_unix]

Wrapper for Unix.chroot

chroot [Uwt.Unix]

Change the process root directory.

cleanup [Uwt.Main]

Call Uwt.Main.cleanup, if you've called Uwt.Main.run and and don't intend to call Uwt.Main.run again any time soon.

close [Uwt_io]

close ch closes the given channel.

close [Uwt_compat.Lwt_unix]

Close a file descriptor.

close [Uwt_base.Fs_functions]

Close a file descriptor.

close [Uwt.Handle]

Handles are closed automatically, if they are not longer referenced from the OCaml heap.

close_noerr [Uwt.Handle]
close_wait [Uwt.Handle]
closedir [Uwt_compat.Lwt_unix]
connect [Uwt.Pipe]

Connect to the Unix domain socket or the named pipe.

connect [Uwt.Tcp]

Establish an IPv4 or IPv6 TCP connection.

copy [Uwt_bytes]

copy buffer creates a copy of the given byte array.

copyfile [Uwt_base.Fs_functions]

Copies a file from ~src to ~dst.

cpu_info [Uwt_base.Misc]

Gets information about the CPUs on the system.

cpu_info_exn [Uwt_base.Misc]
create [Uwt_timeout]

create n f defines a new timeout with n seconds duration.

create [Uwt_throttle.S]
create [Uwt_bytes]

Creates a new byte array of the given size.

create [Uwt.Async]

Creates a new async handle.

cwd [Uwt_base.Misc]

Gets the current working directory

D
default_buffer_size [Uwt_io]

Return the default size for buffers.

detach [Uwt_preemptive]

detach f x runs the computation f x in a separate preemptive thread.

direct_access [Uwt_io]

direct_access ch f passes to f a Uwt_io.direct_access structure.

disable_keepalive [Uwt.Tcp]
disable_keepalive_exn [Uwt.Tcp]
disable_signal_handler [Uwt_compat.Lwt_unix]

Stops receiving this signal

disable_stdio_inheritance [Uwt.Process]

Disables inheritance for file descriptors / handles that this process inherited from its parent.

drop [Uwt_base.Iovec_write]

drop tl n adjusts the I/O vector list tl so that it no longer includes its first n bytes.

E
e2big [Uwt_base.Int_result]
eacces [Uwt_base.Int_result]
eaddrinuse [Uwt_base.Int_result]
eaddrnotavail [Uwt_base.Int_result]
eafnosupport [Uwt_base.Int_result]
eagain [Uwt_base.Int_result]
eai_addrfamily [Uwt_base.Int_result]
eai_again [Uwt_base.Int_result]
eai_badflags [Uwt_base.Int_result]
eai_badhints [Uwt_base.Int_result]
eai_canceled [Uwt_base.Int_result]
eai_fail [Uwt_base.Int_result]
eai_family [Uwt_base.Int_result]
eai_memory [Uwt_base.Int_result]
eai_nodata [Uwt_base.Int_result]
eai_noname [Uwt_base.Int_result]
eai_overflow [Uwt_base.Int_result]
eai_protocol [Uwt_base.Int_result]
eai_service [Uwt_base.Int_result]
eai_socktype [Uwt_base.Int_result]
ealready [Uwt_base.Int_result]
ebadf [Uwt_base.Int_result]
ebusy [Uwt_base.Int_result]
ecanceled [Uwt_base.Int_result]
echarset [Uwt_base.Int_result]
econnaborted [Uwt_base.Int_result]
econnrefused [Uwt_base.Int_result]
econnreset [Uwt_base.Int_result]
edestaddrreq [Uwt_base.Int_result]
eexist [Uwt_base.Int_result]
efault [Uwt_base.Int_result]
efbig [Uwt_base.Int_result]
ehostunreach [Uwt_base.Int_result]
eintr [Uwt_base.Int_result]
einval [Uwt_base.Int_result]
eio [Uwt_base.Int_result]
eisconn [Uwt_base.Int_result]
eisdir [Uwt_base.Int_result]
eloop [Uwt_base.Int_result]
emfile [Uwt_base.Int_result]
emlink [Uwt_base.Int_result]
emsgsize [Uwt_base.Int_result]
enable_keepalive [Uwt.Tcp]

enable_keepalive tcp delay enables keep-alive, the delay is the initial delay in seconds

enable_keepalive_exn [Uwt.Tcp]
enametoolong [Uwt_base.Int_result]
enetdown [Uwt_base.Int_result]
enetunreach [Uwt_base.Int_result]
enfile [Uwt_base.Int_result]
enobufs [Uwt_base.Int_result]
enodev [Uwt_base.Int_result]
enoent [Uwt_base.Int_result]
enomem [Uwt_base.Int_result]
enonet [Uwt_base.Int_result]
enoprotoopt [Uwt_base.Int_result]
enospc [Uwt_base.Int_result]
enosys [Uwt_base.Int_result]
enotconn [Uwt_base.Int_result]
enotdir [Uwt_base.Int_result]
enotempty [Uwt_base.Int_result]
enotsock [Uwt_base.Int_result]
enotsup [Uwt_base.Int_result]
enter_iter_hooks [Uwt.Main]

Functions that are called before the main iteration.

enxio [Uwt_base.Int_result]
eof [Uwt_base.Int_result]
eperm [Uwt_base.Int_result]
epipe [Uwt_base.Int_result]
eprint [Uwt_io]
eprintf [Uwt_io]

%! does nothing here.

eprintl [Uwt_io]
eprintlf [Uwt_io]

%! does nothing here.

eproto [Uwt_base.Int_result]
eprotonosupport [Uwt_base.Int_result]
eprototype [Uwt_base.Int_result]
erange [Uwt_base.Int_result]
erofs [Uwt_base.Int_result]
err_name [Uwt_base]

error name for the given error code

eshutdown [Uwt_base.Int_result]
espipe [Uwt_base.Int_result]
esrch [Uwt_base.Int_result]
establish_server [Uwt_io]

Like establish_server_with_client_address, but does not pass the client address to the callback f.

establish_server_with_client_address [Uwt_io]

establish_server_with_client_address listen_address f creates a server which listens for incoming connections on listen_address.

etimedout [Uwt_base.Int_result]
etxtbsy [Uwt_base.Int_result]
exdev [Uwt_base.Int_result]
exec [Uwt_process]

Executes the given command and returns its exit status.

exepath [Uwt_base.Misc]

like Sys.executable_name , but utf-8 encoded under windows and perhaps more reliable under niche operating systems

exit_hooks [Uwt.Main]

Sets of functions executed just before the program exit.

extract [Uwt_bytes]

extract buffer offset length creates a new byte array of length length and copy the length bytes of buffer at offset into it.

F
fchmod [Uwt_compat.Lwt_unix]

Change the permissions of an opened file.

fchmod [Uwt_base.Fs_functions]

Change the permissions of an opened file.

fchown [Uwt_compat.Lwt_unix]

Change the owner uid and owner gid of an opened file.

fchown [Uwt_base.Fs_functions]

Change the owner ~uid and owner ~gid of the opened file.

fdatasync [Uwt_compat.Lwt_unix]

Synchronise all data (but not metadata) of the file descriptor with the disk.

fdatasync [Uwt_base.Fs_functions]

Uwt_base.Fs_functions.fdatasync is similar to Uwt_base.Fs_functions.fsync, but does not flush modified metadata unless that metadata is needed in order to allow a subsequent data retrieval to be correctly handled.

file_descr_of_file [Uwt_base.Conv]
file_exists [Uwt_compat.Lwt_unix.LargeFile]
file_exists [Uwt_compat.Lwt_unix]

file_exists name tests if a file named name exists.

file_length [Uwt_io]

Retrieves the length of the file at the given path.

file_of_file_descr [Uwt_base.Conv]

the function always succeed on Unix - but not on Windows.

fileno [Uwt.Handle_fileno]
fileno_exn [Uwt.Handle_fileno]
files_of_directory [Uwt_compat.Lwt_unix]

files_of_directory dir returns the stream of all files of dir.

fill [Uwt_bytes]

fill buffer offset length value puts value in all length bytes of buffer starting at offset offset.

flush [Uwt_io]

flush oc performs all pending writes on oc

flush_all [Uwt_io]

flush_all () flushes all open output channels

fprint [Uwt_io]
fprintf [Uwt_io]

%! does nothing here.

fprintl [Uwt_io]
fprintlf [Uwt_io]

%! does nothing here.

from_file_descr [Uwt_compat.Lwt_unix]
fstat [Uwt_compat.Lwt_unix.LargeFile]
fstat [Uwt_compat.Lwt_unix]

Return the information for the file associated with the given descriptor.

fstat [Uwt_base.Fs_functions]

Uwt_base.Fs_functions.fstat is identical to Uwt_base.Fs_functions.stat, except that the file about which information is to be retrieved is specified by the file descriptor

fsync [Uwt_compat.Lwt_unix]

Synchronise all data and metadata of the file descriptor with the disk.

fsync [Uwt_base.Fs_functions]

synchronize a file's in-core state with storage device.

ftruncate [Uwt_compat.Lwt_unix.LargeFile]
ftruncate [Uwt_compat.Lwt_unix]

Truncates the file corresponding to the given descriptor to the given size.

ftruncate [Uwt_base.Fs_functions]

truncate a file to a specified length

futime [Uwt_base.Fs_functions]

Uwt_base.Fs_functions.futime is identical to Uwt_base.Fs_functions.utime, except that the file about which information is to be retrieved is specified by the file descriptor

G
get [Uwt_bytes]

get buffer offset returns the byte at offset offset in buffer.

get_bounds [Uwt_preemptive]

get_bounds () returns the minimum and the maximum number of preemptive threads.

get_max_number_of_threads_queued [Uwt_preemptive]

Returns the size of the waiting queue, if no more threads are available

get_passwd [Uwt_base.Misc]

pw_passwd and pw_gecos will currently always contain an empty string.

get_process_title [Uwt_base.Misc]
get_recv_buffer_size [Uwt.Handle_ext]

Gets the size of the receive buffer that the operating system uses for the socket.

get_recv_buffer_size_exn [Uwt.Handle_ext]
get_send_buffer_size [Uwt.Handle_ext]

Gets the size of the send buffer that the operating system uses for the socket.

get_send_buffer_size_exn [Uwt.Handle_ext]
get_total_memory [Uwt_base.Misc]

Gets memory information (in bytes).

get_winsize [Uwt.Tty]

Gets the current Window size.

get_winsize_exn [Uwt.Tty]
getaddrinfo [Uwt_compat.Lwt_unix]

getaddrinfo host service opts returns a list of Unix.addr_info records describing socket parameters and addresses suitable for communicating with the given host and service.

getaddrinfo [Uwt.Dns]

Asynchronous getaddrinfo(3).

getcwd [Uwt_compat.Lwt_unix]

Wrapper for Unix.getcwd

getcwd [Uwt.Unix]

Return the name of the current working directory.

getenv [Uwt_base.Misc]

Return the value associated to a variable in the process environment.

getgrgid [Uwt_compat.Lwt_unix]

Find an entry in group with the given group id.

getgrgid [Uwt.Unix]

Find an entry in group with the given group id.

getgrnam [Uwt_compat.Lwt_unix]

Find an entry in group with the given name.

getgrnam [Uwt.Unix]

Find an entry in group with the given name.

gethostbyaddr [Uwt_compat.Lwt_unix]

Find an entry in hosts with the given address.

gethostbyaddr [Uwt.Unix]

Find an entry in hosts with the given address.

gethostbyname [Uwt_compat.Lwt_unix]

Find an entry in hosts with the given name.

gethostbyname [Uwt.Unix]

Find an entry in hosts with the given name.

gethostname [Uwt_compat.Lwt_unix]

Return the name of the local host.

gethostname [Uwt.Unix]

Return the name of the local host.

getlogin [Uwt_compat.Lwt_unix]

Return the login name of the user executing the process.

getlogin [Uwt.Unix]

Return the login name of the user executing the process.

getnameinfo [Uwt_compat.Lwt_unix]

getnameinfo addr opts returns the host name and service name corresponding to the socket address addr.

getnameinfo [Uwt.Dns]

Asynchronous getnameinfo(3).

getpeername [Uwt.Pipe]

Get the name of the Unix domain socket or the named pipe to which the handle is connected.

getpeername [Uwt.Tcp]

Get the address of the peer connected to the handle.

getpeername_exn [Uwt.Pipe]
getpeername_exn [Uwt.Tcp]
getppid [Uwt_base.Misc]

Returns the parent process ID.

getprotobyname [Uwt_compat.Lwt_unix]

Find an entry in services with the given name.

getprotobyname [Uwt.Unix]

Find an entry in protocols with the given name.

getprotobynumber [Uwt_compat.Lwt_unix]

Find an entry in protocols with the given protocol number.

getprotobynumber [Uwt.Unix]

Find an entry in protocols with the given protocol number.

getpwnam [Uwt_compat.Lwt_unix]

Find an entry in passwd with the given name.

getpwnam [Uwt.Unix]

Find an entry in passwd with the given name.

getpwuid [Uwt_compat.Lwt_unix]

Find an entry in passwd with the given user id.

getpwuid [Uwt.Unix]

Find an entry in passwd with the given user id.

getrusage [Uwt_base.Misc]

Gets the resource usage measures for the current process.

getrusage_exn [Uwt_base.Misc]
getservbyname [Uwt_compat.Lwt_unix]

Find an entry in services with the given name.

getservbyname [Uwt.Unix]

Find an entry in services with the given name.

getservbyport [Uwt_compat.Lwt_unix]

Find an entry in services with the given service number.

getservbyport [Uwt.Unix]

Find an entry in services with the given service number.

getsockname [Uwt.Pipe]

Get the name of the Unix domain socket or the named pipe.

getsockname [Uwt.Udp]

Get the local IP and port of the UDP handle.

getsockname [Uwt.Tcp]

Get the current address to which the handle is bound.

getsockname_exn [Uwt.Pipe]
getsockname_exn [Uwt.Udp]
getsockname_exn [Uwt.Tcp]
guess_handle [Uwt_base.Misc]

Used to detect what type of stream should be used with a given file descriptor.

H
handle_unix_error [Uwt_compat.Lwt_unix]

Same as Unix.handle_unix_error but catches lwt-level exceptions

has_ref [Uwt.Handle]

Returns non-zero if the handle is referenced, zero otherwise.

hexdump [Uwt_io]

hexdump oc str = hexdump_stream oc (Lwt_stream.of_string str)

hexdump_stream [Uwt_io]

hexdump_stream oc byte_stream produces the same output as the command hexdump -C.

hrtime [Uwt_base.Misc]

Returns the current high-resolution real time.

I
init [Uwt_preemptive]

init min max log initialises this module.

init [Uwt.Pipe]

The only thing that can go wrong, is memory allocation.

init [Uwt.Tty]

Initialize a new TTY stream with the given file descriptor.

init [Uwt.Udp]

See comment to Uwt.Pipe.init

init [Uwt.Tcp]

See comment to Uwt.Pipe.init

init_exn [Uwt.Tty]
init_ipv4 [Uwt.Udp]

wrappers around uv_udp_init_ex.

init_ipv4 [Uwt.Tcp]

wrappers around uv_tcp_init_ex.

init_ipv4_exn [Uwt.Udp]
init_ipv4_exn [Uwt.Tcp]
init_ipv6 [Uwt.Udp]
init_ipv6 [Uwt.Tcp]
init_ipv6_exn [Uwt.Udp]
init_ipv6_exn [Uwt.Tcp]
input [Uwt_io]

input input mode representation

interface_addresses [Uwt_base.Misc]

Gets address information about the network interfaces on the system.

interface_addresses_exn [Uwt_base.Misc]
ip4_addr [Uwt_base.Misc]

Convert a string containing an IPv4 addresses to a binary structure.

ip4_addr_exn [Uwt_base.Misc]
ip4_name [Uwt_base.Misc]

Convert a binary structure containing an IPv4 address to a string.

ip4_name_exn [Uwt_base.Misc]
ip6_addr [Uwt_base.Misc]

Convert a string containing an IPv6 addresses to a binary structure.

ip6_addr_exn [Uwt_base.Misc]
ip6_name [Uwt_base.Misc]

Convert a binary structure containing an IPv6 address to a string.

ip6_name_exn [Uwt_base.Misc]
is_active [Uwt.Handle]

Returns non-zero if the handle is active, zero if it's inactive.

is_busy [Uwt_io]

is_busy channel returns whether the given channel is currently busy.

is_error [Uwt_base.Int_result]
is_ok [Uwt_base.Int_result]
is_readable [Uwt.Stream]
is_writable [Uwt.Stream]
isatty [Uwt_compat.Lwt_unix]

Return true if the given file descriptor refers to a terminal or console window, false otherwise.

K
kill [Uwt.Process]

Sends the specified signal to the given PID.

kill_exn [Uwt.Process]
L
lchown [Uwt_base.Fs_functions]

like chown, but do not dereference symbolic links

leave_iter_hooks [Uwt.Main]

Functions that are called after the main iteration.

length [Uwt_io]

Returns the length of the channel in bytes

length [Uwt_bytes]

Returns the length of the given byte array.

lines_of_file [Uwt_io]

lines_of_file name returns a stream of all lines of the file with name name.

lines_to_file [Uwt_io]

lines_to_file name lines writes all lines of lines to file with name name.

link [Uwt_compat.Lwt_unix]

link source dest creates a hard link named dest to the file named source.

link [Uwt_base.Fs_functions]

Uwt_base.Fs_functions.link creates a new link (also known as a hard link) to an existing file

listen [Uwt.Stream]

Start listening for incoming connections.

listen_exn [Uwt.Stream]
load_avg [Uwt_base.Misc]

Gets the load average.

lockf [Uwt.Unix]

See the long comment at the standard Unix module

lseek [Uwt_compat.Lwt_unix.LargeFile]
lseek [Uwt_compat.Lwt_unix]

Set the current position for a file descriptor, and return the resulting offset (from the beginning of the file).

lseek [Uwt.Unix]

Set the current position for a file descriptor, and return the resulting offset (from the beginning of the file).

lstat [Uwt_compat.Lwt_unix.LargeFile]
lstat [Uwt_compat.Lwt_unix]

Same as Uwt_compat.Lwt_unix.stat, but in case the file is a symbolic link, return the information for the link itself.

lstat [Uwt_base.Fs_functions]

Uwt_base.Fs_functions.lstat is identical to Uwt_base.Fs_functions.stat, except that if pathname is a symbolic link.

M
make [Uwt_io]

make ?buffer ?close ~mode perform_io is the main function for creating new channels.

mkdir [Uwt_compat.Lwt_unix]

Create a directory with the given permissions.

mkdir [Uwt_base.Fs_functions]

Create a directory.

mkdtemp [Uwt_base.Fs_functions]

The Uwt_base.Fs_functions.mkdtemp function generates a uniquely named temporary directory from template.

mode [Uwt_io]

mode ch returns the mode of a channel

N
nodelay [Uwt.Tcp]

Enable TCP_NODELAY, which disables Nagle's algorithm.

nodelay_exn [Uwt.Tcp]
null [Uwt_io]

Output which drops everything

O
of_bytes [Uwt_io]

Create a channel from a byte array.

of_bytes [Uwt_bytes]

of_bytes buf returns a newly allocated byte array with the same contents as buf.

of_file [Uwt_io]

of_file ?buffer ?close ~mode fd creates a channel from a file descriptor.

of_pipe [Uwt_io]
of_stream [Uwt_io]
of_string [Uwt_bytes]

of_string buf returns a newly allocated byte array with the same contents as buf.

of_tcp [Uwt_io]
of_unix_error [Uwt_base]

get back the original Uwt.error from an exception raised by a Uwt function

on_signal [Uwt_compat.Lwt_unix]

on_signal signum f calls f each time the signal with numnber signum is received by the process.

on_signal_full [Uwt_compat.Lwt_unix]

on_signal_full f is the same as on_signal f except that f also receive the signal handler identifier as argument so it can disable it.

oneshot [Uwt.Signal]

Wait for the signal once and reset the moment the signal is received.

open_connection [Uwt_io]

open_connection ?in_buffer ?out_buffer addr opens a connection to the given address and returns two channels for using it.

open_file [Uwt_io]

open_file ?buffer ?flags ?perm ~mode filename opens the file with name filename, and returns a channel for either reading or writing it.

open_file [Uwt_compat.Lwt_io]
open_process [Uwt_process]
open_process_full [Uwt_process]
open_process_in [Uwt_process]
open_process_none [Uwt_process]
open_process_out [Uwt_process]
open_temp_file [Uwt_io]

open_temp_file () starts creating a new temporary file, and evaluates to a promise for the pair of the file's name, and an output channel for writing to the file.

open_temp_file [Uwt_compat.Lwt_io]
opendir [Uwt_compat.Lwt_unix]

This not really opens a descriptor on a directory.

openfile [Uwt_compat.Lwt_unix]

Wrapper for Unix.openfile.

openfile [Uwt_base.Fs_functions]

Equivalent to open(2).

openpipe [Uwt.Pipe]

Be careful with open* functions.

openpipe_exn [Uwt.Pipe]
opentcp [Uwt.Tcp]

See comment to Uwt.Pipe.openpipe

opentcp_exn [Uwt.Tcp]
openudp [Uwt.Udp]

See comment to Uwt.Pipe.openpipe

openudp_exn [Uwt.Udp]
os [Uwt_base.Sys_info]

Uwt_base.Sys_info.os is determined at compile time (by the c compiler) and might differ from the later OS

os_homedir [Uwt_base.Misc]

Gets the current user's home directory.

os_tmpdir [Uwt_base.Misc]

Gets the temp directory.

output [Uwt_io]

output output mode representation

P
pending_count [Uwt.Pipe]
pending_count_exn [Uwt.Pipe]

how many handles are waiting to be accepted with Uwt.Pipe.accept_ipc

pending_instances [Uwt.Pipe]

Set the number of pending pipe instance handles when the pipe server is waiting for connections.

pending_instances_exn [Uwt.Pipe]
pid [Uwt.Process]

returns the PID of the spawned process

pid_exn [Uwt.Process]
pipe [Uwt_io]

pipe ?cloexec ?in_buffer ?out_buffer () creates a pipe using Uwt.Unix.pipe and makes two channels from the two returned file descriptors

pipe [Uwt_compat.Lwt_unix]

pipe () creates pipe using Unix.pipe and returns two file descriptors created from unix file_descriptor

pipe [Uwt.Unix]

pipe () creates pipes similar to Unix.pipe, but as

pipe_exn [Uwt.Unix]
pipe_in [Uwt_compat.Lwt_unix]

pipe_in () is the same as Uwt_compat.Lwt_unix.pipe but maps only the unix file descriptor for reading into a lwt one.

pipe_out [Uwt_compat.Lwt_unix]

pipe_out () is the inverse of Uwt_compat.Lwt_unix.pipe_in.

plain [Uwt_base.Int_result]

return a plain integer number, positive or negative

pmap [Uwt_process]
pmap_chars [Uwt_process]
pmap_line [Uwt_process]
pmap_lines [Uwt_process]
position [Uwt_io]

position ch Returns the current position in the channel.

pread [Uwt_process]
pread [Uwt_base.Fs_functions]

Uwt_base.Fs_functions.pread is equivalent to Uwt_base.Fs_functions.read, except that it reads from a given position ~fd_offset in the file without changing the file offset.

pread_ba [Uwt_base.Fs_functions]
pread_chars [Uwt_process]
pread_line [Uwt_process]
pread_lines [Uwt_process]
print [Uwt_io]
print_active_handles [Uwt.Debug]

This is the same as Uwt.Debug.print_all_handles except only active handles are printed.

print_all_handles [Uwt.Debug]

Prints all handles associated with the given loop to the given stream.

printf [Uwt_io]

%! does nothing here.

printl [Uwt_io]
printlf [Uwt_io]

%! does nothing here.

process_kill [Uwt.Process]

Sends the specified signal to the given process handle.

process_kill_exn [Uwt.Process]
proxy [Uwt_bytes]

proxy buffer offset length creates a ``proxy''.

putenv [Uwt_base.Misc]

putenv ~key ~data sets the value associated to a variable in the process environment.

pwrite [Uwt_process]
pwrite [Uwt_base.Fs_functions]

Uwt_base.Fs_functions.pwrite is equivalent to Uwt_base.Fs_functions.write, except that it writes into a given position ~fd_offset and does not change the file offset

pwrite_ba [Uwt_base.Fs_functions]
pwrite_chars [Uwt_process]
pwrite_line [Uwt_process]
pwrite_lines [Uwt_process]
pwrite_string [Uwt_base.Fs_functions]
pwritev [Uwt_base.Fs_functions]

Uwt_base.Fs_functions.pwritev is equivalent to Uwt_base.Fs_functions.pwrite, except that it writes into a given position and does not change the file offset

R
raise_exn [Uwt_base.Int_result]

Invalid_argument, if Uwt_base.Int_result.is_error is false

read [Uwt_io]

read ?count ic reads at most count characters from ic.

read [Uwt_compat.Lwt_unix]

read fd buff ofs len reads len bytes from descriptor fd, storing them in byte sequence buff, starting at position ofs in buff.

read [Uwt_base.Fs_functions]

read ~pos ~len fd ~buf reads ~len bytes from descriptor fd, storing them in byte sequence buf, starting at position ~pos in ~buf.

read [Uwt.Stream]

There is currently no uv_read function in libuv, just uv_read_start and uv_read_stop.

read_ba [Uwt_base.Fs_functions]

like Uwt_base.Fs_functions.read, buf for bigarrays.

read_ba [Uwt.Stream]
read_char [Uwt_io]

read_char ic reads the next character of ic.

read_char_opt [Uwt_io]

Same as read_byte but does not raise End_of_file on end of input

read_chars [Uwt_io]

read_chars ic returns a stream holding all characters of ic

read_float32 [Uwt_io.NumberIO]

Reads an IEEE single precision floating point value

read_float64 [Uwt_io.NumberIO]

Reads an IEEE double precision floating point value

read_int [Uwt_io.NumberIO]

Reads a 32-bits integer as an ocaml int

read_int16 [Uwt_io.NumberIO]
read_int32 [Uwt_io.NumberIO]
read_int64 [Uwt_io.NumberIO]
read_into [Uwt_io]

read_into ic buffer offset length reads up to length bytes, stores them in buffer at offset offset, and returns the number of bytes read.

read_into_exactly [Uwt_io]

read_into_exactly ic buffer offset length reads exactly length bytes and stores them in buffer at offset offset.

read_line [Uwt_io]

read_line ic reads one complete line from ic and returns it without the end of line.

read_line_opt [Uwt_io]

Same as Uwt_io.read_line but do not raise End_of_file on end of input.

read_lines [Uwt_io]

read_lines ic returns a stream holding all lines of ic

read_start [Uwt.Stream]

Read data from an incoming stream.

read_start_exn [Uwt.Stream]
read_stop [Uwt.Stream]

Stop reading data from the stream.

read_stop_exn [Uwt.Stream]
read_value [Uwt_io]

read_value channel reads a marshaled value from channel; it corresponds to the standard library's Marshal.from_channel.

readdir [Uwt_compat.Lwt_unix]
readdir_n [Uwt_compat.Lwt_unix]
readlink [Uwt_compat.Lwt_unix]

Read the contents of a symbolic link.

readlink [Uwt_base.Fs_functions]

Uwt_base.Fs_functions.readlink reads the value of a symbolic link

realpath [Uwt_base.Fs_functions]

Equivalent to realpath(3) on Unix.

realpath [Uwt.Unix]

wrapper around realpath under Unix and GetFinalPathNameByHandleW or GetFullPathName under windows.

recv [Uwt.Udp]

Wrappers around Uwt.Udp.recv_start and Uwt.Udp.recv_stop for you convenience, no callback soup.

recv_ba [Uwt.Udp]
recv_start [Uwt.Udp]

Prepare for receiving data.

recv_start_exn [Uwt.Udp]
recv_stop [Uwt.Udp]

Stop listening for incoming datagrams.

recv_stop_exn [Uwt.Udp]
ref' [Uwt.Handle]

Reference the given handle.

rename [Uwt_compat.Lwt_unix]

rename old new changes the name of a file from old to new.

rename [Uwt_base.Fs_functions]

change the name or location of a file

reset_mode [Uwt.Tty]

To be called when the program exits.

reset_mode_exn [Uwt.Tty]
resident_set_memory [Uwt_base.Misc]

Gets the resident set size (RSS) for the current process.

resident_set_memory_exn [Uwt_base.Misc]
resize_buffer [Uwt_io]

Resize the internal buffer to the given size

rmdir [Uwt_compat.Lwt_unix]

Remove an empty directory.

rmdir [Uwt_base.Fs_functions]

Delete an empty directory

run [Uwt.Main]

Unlike Lwt_main.run, it's not allowed to nest calls to Uwt.Main.run.

run_in_main [Uwt_preemptive]

run_in_main f can be called from a detached computation to execute f () in the main preemptive thread, i.e.

S
scandir [Uwt_base.Fs_functions]

On Linux, getting the type of an entry is only supported by some filesystems (btrfs, ext2, ext3 and ext4 at the time of this writing), check the getdents(2) man page.

send [Uwt.Async]

Wakeup the event loop and call the async handle's callback.

send [Uwt.Udp]

Send data over the UDP socket.

send_ba [Uwt.Udp]
send_queue_count [Uwt.Udp]

Number of send requests currently in the queue awaiting to be processed.

send_queue_size [Uwt.Udp]

Number of bytes queued for sending; strictly shows how much information is currently queued.

send_raw [Uwt.Udp]

See comment to Uwt.Stream.write_raw

send_raw_ba [Uwt.Udp]
send_raw_string [Uwt.Udp]
send_string [Uwt.Udp]
sendfile [Uwt_base.Fs_functions]

A limited equivalent to sendfile(2).

sendv [Uwt.Udp]
sendv_raw [Uwt.Udp]
set [Uwt_bytes]

get buffer offset value changes the value of the byte at offset offset in buffer to value.

set_blocking [Uwt.Stream]

Just don't use this function.

set_bounds [Uwt_preemptive]

set_bounds (min, max) set the minimum and the maximum number of preemptive threads.

set_broadcast [Uwt.Udp]

Set broadcast on or off.

set_broadcast_exn [Uwt.Udp]
set_default_buffer_size [Uwt_io]

Change the default buffer size.

set_exn_handler [Uwt_timeout]

set the default handler for exception occurring after a timeout.

set_max_number_of_threads_queued [Uwt_preemptive]

Sets the size of the waiting queue, if no more preemptive threads are available.

set_membership [Uwt.Udp]

Set membership for a multicast address

set_membership_exn [Uwt.Udp]
set_mode [Uwt.Tty]

Set the TTY using the specified terminal mode

set_mode_exn [Uwt.Tty]
set_multicast_interface [Uwt.Udp]

Set the multicast interface to send or receive data on

set_multicast_interface_exn [Uwt.Udp]
set_multicast_loop [Uwt.Udp]

Set IP multicast loop flag.

set_multicast_loop_exn [Uwt.Udp]
set_multicast_ttl [Uwt.Udp]

Set the multicast ttl, ttl - 1 through 255.

set_multicast_ttl_exn [Uwt.Udp]
set_position [Uwt_io]

set_position ch pos Sets the position in the output channel.

set_process_title [Uwt_base.Misc]

Sets the process title.

set_recv_buffer_size [Uwt.Handle_ext]

Sets the size of the receive buffer that the operating system uses for the socket.

set_recv_buffer_size_exn [Uwt.Handle_ext]
set_send_buffer_size [Uwt.Handle_ext]

Sets the size of the send buffer that the operating system uses for the socket.

set_send_buffer_size_exn [Uwt.Handle_ext]
set_ttl [Uwt.Udp]

Set the time to live.

set_ttl_exn [Uwt.Udp]
shell [Uwt_process]

A command executed with the shell.

shutdown [Uwt.Stream]

Shutdown the outgoing (write) side of a duplex stream.

shutdown_server [Uwt_io]

Shutdown the given server

sigbreak [Uwt.Signal]

Uwt.Signal.sigwinch and Uwt.Signal.sigbreak are windows and libuv specific.

sigwinch [Uwt.Signal]
simple_init [Uwt_preemptive]

simple_init () does a simple initialization.

simultaneous_accepts [Uwt.Tcp]

Enable / disable simultaneous asynchronous accept requests that are queued by the operating system when listening for new TCP connections.

simultaneous_accepts_exn [Uwt.Tcp]
sleep [Uwt_compat.Lwt_unix]

sleep d is a thread that remains suspended for d seconds and then terminates.

sleep [Uwt.Unix]

sleep d is a thread that remains suspended for d seconds and then terminates.

sleep [Uwt.Timer]

sleep d is a thread that remains suspended for d milliseconds and then terminates.

spawn [Uwt.Process]

Initializes the process handle and starts the process.

spawn_exn [Uwt.Process]
start [Uwt_timeout]

starts a timeout.

start [Uwt.Async]

This will increase the reference count of the async handle.

start [Uwt.Fs_poll]

Check the file at path for changes every interval milliseconds.

start [Uwt.Fs_event]

Start the handle with the given callback, which will watch the specified path for changes

start [Uwt.Poll]

Starts polling the file descriptor.

start [Uwt.Signal]

use Sys.sigterm, Sys.sigstop, etc

start [Uwt.Timer]

Timers, that are executed only once (repeat=0), are automatically closed.

start_exn [Uwt.Fs_poll]
start_exn [Uwt.Fs_event]
start_exn [Uwt.Poll]
start_exn [Uwt.Signal]
start_exn [Uwt.Timer]
stat [Uwt_compat.Lwt_unix.LargeFile]
stat [Uwt_compat.Lwt_unix]

Return the information for the named file.

stat [Uwt_base.Fs_functions]

Return the information for the named file.

stderr [Uwt_io]

The standard output for error messages, it writes data to Uwt.stderr

stderr [Uwt_compat.Lwt_unix]

The standard file descriptor for printing error messages

stderr [Uwt_base]

File descriptor for standard error.

stdin [Uwt_io]

The standard input, it reads data from Uwt.stdin

stdin [Uwt_compat.Lwt_unix]

The standard file descriptor for input

stdin [Uwt_base]

File descriptor for standard input.

stdout [Uwt_io]

The standard output, it writes data to Uwt.stdout

stdout [Uwt_compat.Lwt_unix]

The standard file descriptor for output

stdout [Uwt_base]

File descriptor for standard output.

stop [Uwt_timeout]

stops a timeout.

stop [Uwt.Async]

Decrease the reference count again

strerror [Uwt_base]

error message for the given error code

symlink [Uwt_compat.Lwt_unix]

symlink source dest creates the file dest as a symbolic link to the file source.

symlink [Uwt_base.Fs_functions]

Uwt_base.Fs_functions.symlink creates a symbolic link named ~dst which contains the string ~src

system [Uwt_compat.Lwt_unix]

Executes the given command, waits until it terminates, and return its termination status.

system_byte_order [Uwt_io]
T
timeout [Uwt_compat.Lwt_unix]

timeout d is a thread that remains suspended for d seconds and then fails with Uwt_compat.Lwt_unix.Timeout.

to_bytes [Uwt_bytes]

to_bytes buf returns newly allocated bytes with the same contents as buf.

to_error [Uwt_base.Int_result]

will raise Invalid_argument, if Uwt_base.Int_result.is_error is false

to_exn [Uwt_base.Int_result]

will raise Invalid_argument, if Uwt_base.Int_result.is_error is false

to_file_descr [Uwt_compat.Lwt_unix]
to_handle [Uwt.Async]
to_handle [Uwt.Process]
to_handle [Uwt.Fs_poll]
to_handle [Uwt.Fs_event]
to_handle [Uwt.Poll]
to_handle [Uwt.Signal]
to_handle [Uwt.Timer]
to_handle [Uwt.Udp]
to_handle [Uwt.Stream]
to_int [Uwt_base.Int_result]

will raise Invalid_argument, if Uwt_base.Int_result.is_ok is false

to_stream [Uwt.Pipe]
to_stream [Uwt.Tty]
to_stream [Uwt.Tcp]
to_string [Uwt_bytes]

to_string buf returns a newly allocated string with the same contents as buf.

to_unix_error [Uwt_base]

map error to Unix.error , Unix.EUNKNOWNERR is used, if the mapping is not possible

truncate [Uwt_compat.Lwt_unix.LargeFile]
truncate [Uwt_compat.Lwt_unix]

Truncates the named file to the given size.

try_send [Uwt.Udp]

Same as Uwt.Udp.send, but won't queue a send request if it can't be completed immediately.

try_send_ba [Uwt.Udp]
try_send_string [Uwt.Udp]
try_sendv [Uwt.Udp]
try_write [Uwt.Stream]

Write data to stream, but won't queue a write request if it can't be completed immediately.

try_write_ba [Uwt.Stream]
try_write_string [Uwt.Stream]
try_writev [Uwt.Stream]

Windows doesn't support writing multiple buffers with a single syscall for some HANDLEs (e.g.

U
unknown [Uwt_base.Int_result]
unlink [Uwt_compat.Lwt_unix]

Removes the named file.

unlink [Uwt_base.Fs_functions]

delete a name and possibly the file it refers to

unref [Uwt.Handle]

Un-reference the given handle.

unsafe_blit [Uwt_bytes]

Same as Uwt_bytes.blit but without bound checking.

unsafe_blit_from_bytes [Uwt_bytes]

Same as blit_string_bytes but without bound checking.

unsafe_blit_to_bytes [Uwt_bytes]

Same as blit_bytes_string but without bound checking.

unsafe_fill [Uwt_bytes]

Same as Uwt_bytes.fill but without bound checking.

unsafe_get [Uwt_bytes]

Same as Uwt_bytes.get but without bound checking.

unsafe_set [Uwt_bytes]

Same as Uwt_bytes.set but without bound checking.

unsetenv [Uwt_base.Misc]

Deletes the environment variable specified by name.

update_events [Uwt.Poll]

Update the events mask that is being watched for

update_events_exn [Uwt.Poll]
uptime [Uwt_base.Misc]

Gets the current system uptime.

uptime_exn [Uwt_base.Misc]
utime [Uwt_base.Fs_functions]

Uwt_base.Fs_functions.utime changes the access and modification times of a file.

utimes [Uwt_compat.Lwt_unix]

utimes path atime mtime updates the access and modification times of the file at path.

uwt_efatal [Uwt_base.Int_result]
V
version [Uwt_base.Misc]

libuv version used

version_raw [Uwt_base.Misc]
version_string [Uwt_base.Misc]
W
wait [Uwt_throttle.S]
win_version [Uwt_base.Sys_info]

Wrapper around RtlGetVersion.

with_accept [Uwt.Tcp]
with_connect [Uwt.Pipe]
with_connect [Uwt.Tcp]
with_connection [Uwt_io]

with_connection ?fd ?in_buffer ?out_buffer addr f opens a connection to the given address and passes the channels to f

with_file [Uwt_io]

with_file ?buffer ?flags ?perm ~mode filename f opens a file and passes the channel to f.

with_file [Uwt_compat.Lwt_io]
with_open [Uwt.Pipe]
with_open [Uwt.Tcp]
with_pipe [Uwt.Pipe]

with_pipe ?ipc f creates a new handle and passes the pipe to f.

with_process [Uwt_process]
with_process_full [Uwt_process]
with_process_in [Uwt_process]
with_process_none [Uwt_process]
with_process_out [Uwt_process]
with_tcp [Uwt.Tcp]

See comments to Uwt.Pipe.with_pipe

with_temp_file [Uwt_io]

with_temp_file f calls Uwt_io.open_temp_file (), passing all optional arguments directly to it.

with_temp_file [Uwt_compat.Lwt_io]
with_timeout [Uwt_compat.Lwt_unix]

with_timeout d f is a short-hand for:

write [Uwt_io]

write oc str writes all characters of str on oc

write [Uwt_compat.Lwt_unix]

write fd buff ofs len writes len bytes to descriptor fd, taking them from byte sequence buff, starting at position ofs in buff.

write [Uwt_base.Fs_functions]

write fd ~pos ~len fd ~buf writes ~len bytes to descriptor fd, taking them from byte sequence buf, starting at position ~pos in ~buf.

write [Uwt.Stream]

Write data to stream

write2 [Uwt.Pipe]

Extended write function for sending handles over a pipe.

write2_ba [Uwt.Pipe]
write2_pipe [Uwt.Pipe]

Similar to Uwt.Pipe.write2, but the send handle is a pipe.

write2_pipe_ba [Uwt.Pipe]
write2_pipe_string [Uwt.Pipe]
write2_string [Uwt.Pipe]
write2_udp [Uwt.Pipe]

Similar to Uwt.Pipe.write2, but the send handle is an udp socket.

write2_udp_ba [Uwt.Pipe]
write2_udp_string [Uwt.Pipe]
write_ba [Uwt_base.Fs_functions]
write_ba [Uwt.Stream]
write_char [Uwt_io]

write_char oc char writes char on oc

write_chars [Uwt_io]

write_chars oc chars writes all characters of chars on oc

write_float32 [Uwt_io.NumberIO]

Writes an IEEE single precision floating point value

write_float64 [Uwt_io.NumberIO]

Writes an IEEE double precision floating point value

write_from [Uwt_io]

write_from oc buffer offset length writes up to length bytes to oc, from buffer at offset offset and returns the number of bytes actually written

write_from_exactly [Uwt_io]

write_from_exactly oc buffer offset length writes all length bytes from buffer at offset offset to oc

write_from_string [Uwt_io]
write_from_string_exactly [Uwt_io]
write_int [Uwt_io.NumberIO]

Writes an ocaml int as a 32-bits integer

write_int16 [Uwt_io.NumberIO]
write_int32 [Uwt_io.NumberIO]
write_int64 [Uwt_io.NumberIO]
write_line [Uwt_io]

write_line oc str writes str on oc followed by a new-line.

write_lines [Uwt_io]

write_lines oc lines writes all lines of lines to oc

write_queue_size [Uwt.Stream]

Returns the amount of queued bytes waiting to be sent

write_raw [Uwt.Stream]

Uwt.Stream.write is eager - like the counterparts inside Lwt_unix.

write_raw_ba [Uwt.Stream]
write_raw_string [Uwt.Stream]
write_string [Uwt_compat.Lwt_unix]
write_string [Uwt_base.Fs_functions]
write_string [Uwt.Stream]
write_value [Uwt_io]

write_value oc ?flags x marshals the value x to oc

writev [Uwt_base.Fs_functions]

write multiple buffers at once.

writev [Uwt.Stream]

See comment to ! This function will fail with Unix.EOPNOTSUPP on Windows for e.g.

writev_emul [Uwt.Stream]

Similar to Uwt.Stream.writev, but if passing several buffers at once is not supported by the OS, the buffers will be written one by one.

writev_raw [Uwt.Stream]
Y
yield [Uwt_compat.Lwt_unix]

yield () is a thread that suspends itself and then resumes as soon as possible and terminates.

yield [Uwt.Main]

yield () is a threads which suspends itself and then resumes as soon as possible and terminates.

Z
zero [Uwt_io]

Inputs which returns always '\x00'