sig
type error =
Uwt_base.error =
E2BIG
| EACCES
| EADDRINUSE
| EADDRNOTAVAIL
| EAFNOSUPPORT
| EAGAIN
| EAI_ADDRFAMILY
| EAI_AGAIN
| EAI_BADFLAGS
| EAI_BADHINTS
| EAI_CANCELED
| EAI_FAIL
| EAI_FAMILY
| EAI_MEMORY
| EAI_NODATA
| EAI_NONAME
| EAI_OVERFLOW
| EAI_PROTOCOL
| EAI_SERVICE
| EAI_SOCKTYPE
| EALREADY
| EBADF
| EBUSY
| ECANCELED
| ECHARSET
| ECONNABORTED
| ECONNREFUSED
| ECONNRESET
| EDESTADDRREQ
| EEXIST
| EFAULT
| EFBIG
| EHOSTUNREACH
| EINTR
| EINVAL
| EIO
| EISCONN
| EISDIR
| ELOOP
| EMFILE
| EMSGSIZE
| ENAMETOOLONG
| ENETDOWN
| ENETUNREACH
| ENFILE
| ENOBUFS
| ENODEV
| ENOENT
| ENOMEM
| ENONET
| ENOPROTOOPT
| ENOSPC
| ENOSYS
| ENOTCONN
| ENOTDIR
| ENOTEMPTY
| ENOTSOCK
| ENOTSUP
| EPERM
| EPIPE
| EPROTO
| EPROTONOSUPPORT
| EPROTOTYPE
| ERANGE
| EROFS
| ESHUTDOWN
| ESPIPE
| ESRCH
| ETIMEDOUT
| ETXTBSY
| EXDEV
| UNKNOWN
| EOF
| ENXIO
| EMLINK
| UWT_EFATAL
val strerror : error -> string
val err_name : error -> string
val to_unix_error : error -> Unix.error
val of_unix_error : Unix.error -> error
type 'a uv_result = 'a Uwt_base.uv_result
type ('a, 'b) o_result = ('a, 'b) result = Ok of 'a | Error of 'b
type 'a result = ('a, error) o_result
module Int_result :
sig
type 'a t = 'a Uwt_base.Int_result.t
type real_int = int
type real_unit = unit
type int = real_int t
type unit = real_unit t
val is_ok : 'a t -> bool
val is_error : 'a t -> bool
val to_int : int -> real_int
val to_error : 'a t -> error
val plain : 'a t -> real_int
val to_exn : ?name:string -> ?param:string -> 'a t -> exn
val raise_exn : ?name:string -> ?param:string -> 'a t -> 'b
val eagain : int
val e2big : int
val eacces : int
val eaddrinuse : int
val eaddrnotavail : int
val eafnosupport : int
val eai_addrfamily : int
val eai_again : int
val eai_badflags : int
val eai_badhints : int
val eai_canceled : int
val eai_fail : int
val eai_family : int
val eai_memory : int
val eai_nodata : int
val eai_noname : int
val eai_overflow : int
val eai_protocol : int
val eai_service : int
val eai_socktype : int
val ealready : int
val ebadf : int
val ebusy : int
val ecanceled : int
val echarset : int
val econnaborted : int
val econnrefused : int
val econnreset : int
val edestaddrreq : int
val eexist : int
val efault : int
val efbig : int
val ehostunreach : int
val eintr : int
val einval : int
val eio : int
val eisconn : int
val eisdir : int
val eloop : int
val emfile : int
val emsgsize : int
val enametoolong : int
val enetdown : int
val enetunreach : int
val enfile : int
val enobufs : int
val enodev : int
val enoent : int
val enomem : int
val enonet : int
val enoprotoopt : int
val enospc : int
val enosys : int
val enotconn : int
val enotdir : int
val enotempty : int
val enotsock : int
val enotsup : int
val eperm : int
val epipe : int
val eproto : int
val eprotonosupport : int
val eprototype : int
val erange : int
val erofs : int
val eshutdown : int
val espipe : int
val esrch : int
val etimedout : int
val etxtbsy : int
val exdev : int
val unknown : int
val eof : int
val enxio : int
val emlink : int
val uwt_efatal : int
end
type file = Uwt_base.file
type sockaddr = Uwt_base.sockaddr
type buf =
(char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t
val stdin : file
val stdout : file
val stderr : file
module Iovec_write :
sig
type t =
Uwt_base.Iovec_write.t =
Bigarray of buf * int * int
| String of string * int * int
| Bytes of bytes * int * int
val drop : t list -> int -> t list
type ts = Invalid | Empty | All_ba of t array * t list
val prep_for_cstub : t list -> ts
val length : t -> int
end
module Fs_types :
sig
type uv_open_flag =
Uwt_base.Fs_types.uv_open_flag =
O_RDONLY
| O_WRONLY
| O_RDWR
| O_NONBLOCK
| O_CREAT
| O_EXCL
| O_TRUNC
| O_APPEND
| O_NOCTTY
| O_DSYNC
| O_SYNC
| O_RSYNC
| O_TEMPORARY
| O_SHORT_LIVED
| O_SEQUENTIAL
| O_RANDOM
| O_DIRECT
| O_EXLOCK
| O_NOATIME
| O_SYMLINK
| O_NOFOLLOW
| O_DIRECTORY
type file_kind =
Uwt_base.Fs_types.file_kind =
S_REG
| S_DIR
| S_CHR
| S_BLK
| S_LNK
| S_FIFO
| S_SOCK
| S_UNKNOWN
type symlink_mode =
Uwt_base.Fs_types.symlink_mode =
S_Default
| S_Dir
| S_Junction
type access_permission =
Uwt_base.Fs_types.access_permission =
Read
| Write
| Exec
| Exists
type stats =
Uwt_base.Fs_types.stats = {
st_dev : int;
st_kind : file_kind;
st_perm : int;
st_nlink : int;
st_uid : int;
st_gid : int;
st_rdev : int;
st_ino : int;
st_size : int64;
st_blksize : int;
st_blocks : int;
st_flags : int;
st_gen : int;
st_atime : int64;
st_atime_nsec : int;
st_mtime : int64;
st_mtime_nsec : int;
st_ctime : int64;
st_ctime_nsec : int;
st_birthtime : int64;
st_birthtime_nsec : int;
}
type clone_mode = No_clone | Try_clone | Force_clone
end
module type Fs_functions =
sig
type uv_open_flag =
Fs_types.uv_open_flag =
O_RDONLY
| O_WRONLY
| O_RDWR
| O_NONBLOCK
| O_CREAT
| O_EXCL
| O_TRUNC
| O_APPEND
| O_NOCTTY
| O_DSYNC
| O_SYNC
| O_RSYNC
| O_TEMPORARY
| O_SHORT_LIVED
| O_SEQUENTIAL
| O_RANDOM
| O_DIRECT
| O_EXLOCK
| O_NOATIME
| O_SYMLINK
| O_NOFOLLOW
| O_DIRECTORY
type file_kind =
Fs_types.file_kind =
S_REG
| S_DIR
| S_CHR
| S_BLK
| S_LNK
| S_FIFO
| S_SOCK
| S_UNKNOWN
type symlink_mode =
Fs_types.symlink_mode =
S_Default
| S_Dir
| S_Junction
type access_permission =
Fs_types.access_permission =
Read
| Write
| Exec
| Exists
type stats =
Fs_types.stats = {
st_dev : int;
st_kind : file_kind;
st_perm : int;
st_nlink : int;
st_uid : int;
st_gid : int;
st_rdev : int;
st_ino : int;
st_size : int64;
st_blksize : int;
st_blocks : int;
st_flags : int;
st_gen : int;
st_atime : int64;
st_atime_nsec : int;
st_mtime : int64;
st_mtime_nsec : int;
st_ctime : int64;
st_ctime_nsec : int;
st_birthtime : int64;
st_birthtime_nsec : int;
}
type clone_mode = No_clone | Try_clone | Force_clone
type 'a t
val openfile : ?perm:int -> mode:uv_open_flag list -> string -> file t
val read : ?pos:int -> ?len:int -> file -> buf:bytes -> int t
val read_ba : ?pos:int -> ?len:int -> file -> buf:buf -> int t
val pread :
?pos:int -> ?len:int -> file -> fd_offset:int64 -> buf:bytes -> int t
val pread_ba :
?pos:int -> ?len:int -> file -> fd_offset:int64 -> buf:buf -> int t
val write : ?pos:int -> ?len:int -> file -> buf:bytes -> int t
val write_string : ?pos:int -> ?len:int -> file -> buf:string -> int t
val write_ba : ?pos:int -> ?len:int -> file -> buf:buf -> int t
val pwrite :
?pos:int -> ?len:int -> file -> fd_offset:int64 -> buf:bytes -> int t
val pwrite_string :
?pos:int ->
?len:int -> file -> fd_offset:int64 -> buf:string -> int t
val pwrite_ba :
?pos:int -> ?len:int -> file -> fd_offset:int64 -> buf:buf -> int t
val writev : file -> Iovec_write.t list -> int t
val pwritev : file -> Iovec_write.t list -> int64 -> int t
val close : file -> unit t
val unlink : string -> unit t
val mkdir : ?perm:int -> string -> unit t
val rmdir : string -> unit t
val fsync : file -> unit t
val fdatasync : file -> unit t
val ftruncate : file -> len:int64 -> unit t
val stat : string -> stats t
val lstat : string -> stats t
val fstat : file -> stats t
val rename : src:string -> dst:string -> unit t
val link : target:string -> link_name:string -> unit t
val symlink :
?mode:symlink_mode -> src:string -> dst:string -> unit -> unit t
val mkdtemp : string -> string t
val sendfile :
?pos:int64 ->
?len:nativeint -> dst:file -> src:file -> unit -> nativeint t
val utime : string -> access:float -> modif:float -> unit t
val futime : file -> access:float -> modif:float -> unit t
val readlink : string -> string t
val access : string -> access_permission list -> unit t
val chmod : string -> perm:int -> unit t
val fchmod : file -> perm:int -> unit t
val chown : string -> uid:int -> gid:int -> unit t
val fchown : file -> uid:int -> gid:int -> unit t
val lchown : string -> uid:int -> gid:int -> unit t
val scandir : string -> (file_kind * string) array t
val realpath : string -> string t
val copyfile :
?excl:bool ->
?clone:clone_mode -> src:string -> dst:string -> unit -> unit t
end
module Conv :
sig
val of_unix_sockaddr_exn : Unix.sockaddr -> sockaddr
val to_unix_sockaddr_exn : sockaddr -> Unix.sockaddr
val file_of_file_descr : Unix.file_descr -> file option
val file_descr_of_file : file -> Unix.file_descr option
end
module Misc :
sig
type timeval = Uwt_base.Misc.timeval = { sec : int; usec : int; }
type rusage =
Uwt_base.Misc.rusage = {
utime : timeval;
stime : timeval;
maxrss : int64;
ixrss : int64;
idrss : int64;
isrss : int64;
minflt : int64;
majflt : int64;
nswap : int64;
inblock : int64;
outblock : int64;
msgsnd : int64;
msgrcv : int64;
nsignals : int64;
nvcsw : int64;
nivcsw : int64;
}
type cpu_times =
Uwt_base.Misc.cpu_times = {
user : int64;
nice : int64;
sys : int64;
idle : int64;
irq : int64;
}
type cpu_info =
Uwt_base.Misc.cpu_info = {
model : string;
speed : int;
cpu_times : cpu_times;
}
type interface_address =
Uwt_base.Misc.interface_address = {
name : string;
phys_addr : string;
is_internal : bool;
address : sockaddr option;
netmask : sockaddr option;
}
type handle_type =
Uwt_base.Misc.handle_type =
File
| Tty
| Pipe
| Tcp
| Udp
| Unknown
val guess_handle : Unix.file_descr -> handle_type
val resident_set_memory : unit -> int64 uv_result
val resident_set_memory_exn : unit -> int64
val uptime : unit -> float uv_result
val uptime_exn : unit -> float
val getrusage : unit -> rusage uv_result
val getrusage_exn : unit -> rusage
val cpu_info : unit -> cpu_info array uv_result
val cpu_info_exn : unit -> cpu_info array
val interface_addresses : unit -> interface_address array uv_result
val interface_addresses_exn : unit -> interface_address array
val load_avg : unit -> float * float * float
val ip4_addr : string -> int -> sockaddr uv_result
val ip4_addr_exn : string -> int -> sockaddr
val ip4_name : sockaddr -> string uv_result
val ip4_name_exn : sockaddr -> string
val ip6_addr : string -> int -> sockaddr uv_result
val ip6_addr_exn : string -> int -> sockaddr
val ip6_name : sockaddr -> string uv_result
val ip6_name_exn : sockaddr -> string
val get_total_memory : unit -> int64
val hrtime : unit -> int64
type version =
Uwt_base.Misc.version = {
major : int;
minor : int;
patch : int;
}
val version : unit -> version
val version_raw : unit -> int
val version_string : unit -> string
val os_homedir : unit -> string uv_result
val os_tmpdir : unit -> string uv_result
val get_passwd : unit -> Unix.passwd_entry uv_result
val exepath : unit -> string uv_result
val cwd : unit -> string uv_result
val chdir : string -> Int_result.unit
val getenv : string -> string uv_result
val putenv : key:string -> data:string -> Int_result.unit
val unsetenv : string -> Int_result.unit
val getppid : unit -> Int_result.int
val set_process_title : string -> Int_result.unit
val get_process_title : unit -> string uv_result
end
module Sys_info :
sig
type os =
Windows
| Android
| Linux
| Mac
| Freebsd
| Openbsd
| Cygwin
| Netbsd
| Sun
| Hp
| Dragonfly
| Aix
| Minix
| KFreebsd
| Bsd
| Unknown
val os : os
type win_version = {
major_version : int;
minor_version : int;
build_number : int;
platform_id : int;
csd_version : string;
}
val win_version : unit -> win_version uv_result
end
module Main :
sig
exception Main_error of error * string
exception Fatal of exn * Printexc.raw_backtrace
val yield : unit -> unit Lwt.t
val run : 'a Lwt.t -> 'a
val enter_iter_hooks : (unit -> unit) Lwt_sequence.t
val leave_iter_hooks : (unit -> unit) Lwt_sequence.t
val exit_hooks : (unit -> unit Lwt.t) Lwt_sequence.t
val at_exit : (unit -> unit Lwt.t) -> unit
val cleanup : unit -> unit
end
module Fs :
sig
type uv_open_flag =
Fs_types.uv_open_flag =
O_RDONLY
| O_WRONLY
| O_RDWR
| O_NONBLOCK
| O_CREAT
| O_EXCL
| O_TRUNC
| O_APPEND
| O_NOCTTY
| O_DSYNC
| O_SYNC
| O_RSYNC
| O_TEMPORARY
| O_SHORT_LIVED
| O_SEQUENTIAL
| O_RANDOM
| O_DIRECT
| O_EXLOCK
| O_NOATIME
| O_SYMLINK
| O_NOFOLLOW
| O_DIRECTORY
type file_kind =
Fs_types.file_kind =
S_REG
| S_DIR
| S_CHR
| S_BLK
| S_LNK
| S_FIFO
| S_SOCK
| S_UNKNOWN
type symlink_mode =
Fs_types.symlink_mode =
S_Default
| S_Dir
| S_Junction
type access_permission =
Fs_types.access_permission =
Read
| Write
| Exec
| Exists
type stats =
Fs_types.stats = {
st_dev : int;
st_kind : file_kind;
st_perm : int;
st_nlink : int;
st_uid : int;
st_gid : int;
st_rdev : int;
st_ino : int;
st_size : int64;
st_blksize : int;
st_blocks : int;
st_flags : int;
st_gen : int;
st_atime : int64;
st_atime_nsec : int;
st_mtime : int64;
st_mtime_nsec : int;
st_ctime : int64;
st_ctime_nsec : int;
st_birthtime : int64;
st_birthtime_nsec : int;
}
type clone_mode = No_clone | Try_clone | Force_clone
val openfile :
?perm:int -> mode:uv_open_flag list -> string -> file Lwt.t
val read : ?pos:int -> ?len:int -> file -> buf:bytes -> int Lwt.t
val read_ba : ?pos:int -> ?len:int -> file -> buf:buf -> int Lwt.t
val pread :
?pos:int ->
?len:int -> file -> fd_offset:int64 -> buf:bytes -> int Lwt.t
val pread_ba :
?pos:int ->
?len:int -> file -> fd_offset:int64 -> buf:buf -> int Lwt.t
val write : ?pos:int -> ?len:int -> file -> buf:bytes -> int Lwt.t
val write_string :
?pos:int -> ?len:int -> file -> buf:string -> int Lwt.t
val write_ba : ?pos:int -> ?len:int -> file -> buf:buf -> int Lwt.t
val pwrite :
?pos:int ->
?len:int -> file -> fd_offset:int64 -> buf:bytes -> int Lwt.t
val pwrite_string :
?pos:int ->
?len:int -> file -> fd_offset:int64 -> buf:string -> int Lwt.t
val pwrite_ba :
?pos:int ->
?len:int -> file -> fd_offset:int64 -> buf:buf -> int Lwt.t
val writev : file -> Iovec_write.t list -> int Lwt.t
val pwritev : file -> Iovec_write.t list -> int64 -> int Lwt.t
val close : file -> unit Lwt.t
val unlink : string -> unit Lwt.t
val mkdir : ?perm:int -> string -> unit Lwt.t
val rmdir : string -> unit Lwt.t
val fsync : file -> unit Lwt.t
val fdatasync : file -> unit Lwt.t
val ftruncate : file -> len:int64 -> unit Lwt.t
val stat : string -> stats Lwt.t
val lstat : string -> stats Lwt.t
val fstat : file -> stats Lwt.t
val rename : src:string -> dst:string -> unit Lwt.t
val link : target:string -> link_name:string -> unit Lwt.t
val symlink :
?mode:symlink_mode -> src:string -> dst:string -> unit -> unit Lwt.t
val mkdtemp : string -> string Lwt.t
val sendfile :
?pos:int64 ->
?len:nativeint -> dst:file -> src:file -> unit -> nativeint Lwt.t
val utime : string -> access:float -> modif:float -> unit Lwt.t
val futime : file -> access:float -> modif:float -> unit Lwt.t
val readlink : string -> string Lwt.t
val access : string -> access_permission list -> unit Lwt.t
val chmod : string -> perm:int -> unit Lwt.t
val fchmod : file -> perm:int -> unit Lwt.t
val chown : string -> uid:int -> gid:int -> unit Lwt.t
val fchown : file -> uid:int -> gid:int -> unit Lwt.t
val lchown : string -> uid:int -> gid:int -> unit Lwt.t
val scandir : string -> (file_kind * string) array Lwt.t
val realpath : string -> string Lwt.t
val copyfile :
?excl:bool ->
?clone:clone_mode -> src:string -> dst:string -> unit -> unit Lwt.t
end
module Handle :
sig
type t
val close : Uwt.Handle.t -> Int_result.unit
val close_noerr : Uwt.Handle.t -> unit
val close_wait : Uwt.Handle.t -> unit Lwt.t
val is_active : Uwt.Handle.t -> bool
val ref' : Uwt.Handle.t -> unit
val unref : Uwt.Handle.t -> unit
val has_ref : Uwt.Handle.t -> bool
end
module Handle_ext :
sig
type t
val get_send_buffer_size : Uwt.Handle_ext.t -> Int_result.int
val get_send_buffer_size_exn : Uwt.Handle_ext.t -> int
val get_recv_buffer_size : Uwt.Handle_ext.t -> Int_result.int
val get_recv_buffer_size_exn : Uwt.Handle_ext.t -> int
val set_send_buffer_size : Uwt.Handle_ext.t -> int -> Int_result.unit
val set_send_buffer_size_exn : Uwt.Handle_ext.t -> int -> unit
val set_recv_buffer_size : Uwt.Handle_ext.t -> int -> Int_result.unit
val set_recv_buffer_size_exn : Uwt.Handle_ext.t -> int -> unit
end
module Handle_fileno :
sig
type t
val fileno : Uwt.Handle_fileno.t -> Unix.file_descr uv_result
val fileno_exn : Uwt.Handle_fileno.t -> Unix.file_descr
end
module Stream :
sig
type t
val close : t -> Int_result.unit
val close_noerr : t -> unit
val close_wait : t -> unit Lwt.t
val is_active : t -> bool
val ref' : t -> unit
val unref : t -> unit
val has_ref : t -> bool
val to_handle : Uwt.Stream.t -> Uwt.Handle.t
val is_readable : Uwt.Stream.t -> bool
val is_writable : Uwt.Stream.t -> bool
val read_start :
Uwt.Stream.t -> cb:(Bytes.t uv_result -> unit) -> Int_result.unit
val read_start_exn :
Uwt.Stream.t -> cb:(Bytes.t uv_result -> unit) -> unit
val read_stop : Uwt.Stream.t -> Int_result.unit
val read_stop_exn : Uwt.Stream.t -> unit
val read :
?pos:int -> ?len:int -> Uwt.Stream.t -> buf:bytes -> int Lwt.t
val read_ba :
?pos:int -> ?len:int -> Uwt.Stream.t -> buf:buf -> int Lwt.t
val write_queue_size : Uwt.Stream.t -> int
val try_write :
?pos:int -> ?len:int -> Uwt.Stream.t -> buf:bytes -> Int_result.int
val try_write_ba :
?pos:int -> ?len:int -> Uwt.Stream.t -> buf:buf -> Int_result.int
val try_write_string :
?pos:int -> ?len:int -> Uwt.Stream.t -> buf:string -> Int_result.int
val write :
?pos:int -> ?len:int -> Uwt.Stream.t -> buf:bytes -> unit Lwt.t
val write_string :
?pos:int -> ?len:int -> Uwt.Stream.t -> buf:string -> unit Lwt.t
val write_ba :
?pos:int -> ?len:int -> Uwt.Stream.t -> buf:buf -> unit Lwt.t
val write_raw :
?pos:int -> ?len:int -> Uwt.Stream.t -> buf:bytes -> unit Lwt.t
val write_raw_string :
?pos:int -> ?len:int -> Uwt.Stream.t -> buf:string -> unit Lwt.t
val write_raw_ba :
?pos:int -> ?len:int -> Uwt.Stream.t -> buf:buf -> unit Lwt.t
val try_writev : Uwt.Stream.t -> Iovec_write.t list -> Int_result.int
val writev : Uwt.Stream.t -> Iovec_write.t list -> unit Lwt.t
val writev_emul : Uwt.Stream.t -> Iovec_write.t list -> unit Lwt.t
val writev_raw : Uwt.Stream.t -> Iovec_write.t list -> unit Lwt.t
val listen :
Uwt.Stream.t ->
max:int ->
cb:(Uwt.Stream.t -> Int_result.unit -> unit) -> Int_result.unit
val listen_exn :
Uwt.Stream.t ->
max:int -> cb:(Uwt.Stream.t -> Int_result.unit -> unit) -> unit
val shutdown : Uwt.Stream.t -> unit Lwt.t
val set_blocking : Uwt.Stream.t -> bool -> Int_result.unit
end
module Tcp :
sig
type t
val close : t -> Int_result.unit
val close_noerr : t -> unit
val close_wait : t -> unit Lwt.t
val is_active : t -> bool
val ref' : t -> unit
val unref : t -> unit
val has_ref : t -> bool
val to_handle : t -> Handle.t
val is_readable : t -> bool
val is_writable : t -> bool
val read_start : t -> cb:(Bytes.t uv_result -> unit) -> Int_result.unit
val read_start_exn : t -> cb:(Bytes.t uv_result -> unit) -> unit
val read_stop : t -> Int_result.unit
val read_stop_exn : t -> unit
val read : ?pos:int -> ?len:int -> t -> buf:bytes -> int Lwt.t
val read_ba : ?pos:int -> ?len:int -> t -> buf:buf -> int Lwt.t
val write_queue_size : t -> int
val try_write :
?pos:int -> ?len:int -> t -> buf:bytes -> Int_result.int
val try_write_ba :
?pos:int -> ?len:int -> t -> buf:buf -> Int_result.int
val try_write_string :
?pos:int -> ?len:int -> t -> buf:string -> Int_result.int
val write : ?pos:int -> ?len:int -> t -> buf:bytes -> unit Lwt.t
val write_string :
?pos:int -> ?len:int -> t -> buf:string -> unit Lwt.t
val write_ba : ?pos:int -> ?len:int -> t -> buf:buf -> unit Lwt.t
val write_raw : ?pos:int -> ?len:int -> t -> buf:bytes -> unit Lwt.t
val write_raw_string :
?pos:int -> ?len:int -> t -> buf:string -> unit Lwt.t
val write_raw_ba : ?pos:int -> ?len:int -> t -> buf:buf -> unit Lwt.t
val try_writev : t -> Iovec_write.t list -> Int_result.int
val writev : t -> Iovec_write.t list -> unit Lwt.t
val writev_emul : t -> Iovec_write.t list -> unit Lwt.t
val writev_raw : t -> Iovec_write.t list -> unit Lwt.t
val listen :
t -> max:int -> cb:(t -> Int_result.unit -> unit) -> Int_result.unit
val listen_exn :
t -> max:int -> cb:(t -> Int_result.unit -> unit) -> unit
val shutdown : t -> unit Lwt.t
val set_blocking : t -> bool -> Int_result.unit
val get_send_buffer_size : t -> Int_result.int
val get_send_buffer_size_exn : t -> int
val get_recv_buffer_size : t -> Int_result.int
val get_recv_buffer_size_exn : t -> int
val set_send_buffer_size : t -> int -> Int_result.unit
val set_send_buffer_size_exn : t -> int -> unit
val set_recv_buffer_size : t -> int -> Int_result.unit
val set_recv_buffer_size_exn : t -> int -> unit
val fileno : t -> Unix.file_descr uv_result
val fileno_exn : t -> Unix.file_descr
val to_stream : Uwt.Tcp.t -> Uwt.Stream.t
val init : unit -> Uwt.Tcp.t
val init_ipv4 : unit -> Uwt.Tcp.t uv_result
val init_ipv4_exn : unit -> Uwt.Tcp.t
val init_ipv6 : unit -> Uwt.Tcp.t uv_result
val init_ipv6_exn : unit -> Uwt.Tcp.t
val opentcp : Unix.file_descr -> Uwt.Tcp.t uv_result
val opentcp_exn : Unix.file_descr -> Uwt.Tcp.t
type mode = Ipv6_only
val bind :
?mode:Uwt.Tcp.mode list ->
Uwt.Tcp.t -> addr:sockaddr -> unit -> Int_result.unit
val bind_exn :
?mode:Uwt.Tcp.mode list -> Uwt.Tcp.t -> addr:sockaddr -> unit -> unit
val nodelay : Uwt.Tcp.t -> bool -> Int_result.unit
val nodelay_exn : Uwt.Tcp.t -> bool -> unit
val enable_keepalive : Uwt.Tcp.t -> int -> Int_result.unit
val enable_keepalive_exn : Uwt.Tcp.t -> int -> unit
val disable_keepalive : Uwt.Tcp.t -> Int_result.unit
val disable_keepalive_exn : Uwt.Tcp.t -> unit
val simultaneous_accepts : Uwt.Tcp.t -> bool -> Int_result.unit
val simultaneous_accepts_exn : Uwt.Tcp.t -> bool -> unit
val getsockname : Uwt.Tcp.t -> sockaddr uv_result
val getsockname_exn : Uwt.Tcp.t -> sockaddr
val getpeername : Uwt.Tcp.t -> sockaddr uv_result
val getpeername_exn : Uwt.Tcp.t -> sockaddr
val connect : Uwt.Tcp.t -> addr:sockaddr -> unit Lwt.t
val accept : Uwt.Tcp.t -> Uwt.Tcp.t uv_result
val accept_exn : Uwt.Tcp.t -> Uwt.Tcp.t
val with_tcp : (Uwt.Tcp.t -> 'a Lwt.t) -> 'a Lwt.t
val with_connect : addr:sockaddr -> (Uwt.Tcp.t -> 'a Lwt.t) -> 'a Lwt.t
val with_open : Unix.file_descr -> (Uwt.Tcp.t -> 'a Lwt.t) -> 'a Lwt.t
val with_accept : Uwt.Tcp.t -> (Uwt.Tcp.t -> 'a Lwt.t) -> 'a Lwt.t
val accept_raw :
server:Uwt.Tcp.t -> client:Uwt.Tcp.t -> Int_result.unit
val accept_raw_exn : server:Uwt.Tcp.t -> client:Uwt.Tcp.t -> unit
end
module Udp :
sig
type t
val close : t -> Int_result.unit
val close_noerr : t -> unit
val close_wait : t -> unit Lwt.t
val is_active : t -> bool
val ref' : t -> unit
val unref : t -> unit
val has_ref : t -> bool
val get_send_buffer_size : t -> Int_result.int
val get_send_buffer_size_exn : t -> int
val get_recv_buffer_size : t -> Int_result.int
val get_recv_buffer_size_exn : t -> int
val set_send_buffer_size : t -> int -> Int_result.unit
val set_send_buffer_size_exn : t -> int -> unit
val set_recv_buffer_size : t -> int -> Int_result.unit
val set_recv_buffer_size_exn : t -> int -> unit
val fileno : t -> Unix.file_descr uv_result
val fileno_exn : t -> Unix.file_descr
val to_handle : Uwt.Udp.t -> Uwt.Handle.t
val send_queue_size : Uwt.Udp.t -> int
val send_queue_count : Uwt.Udp.t -> int
val init : unit -> Uwt.Udp.t
val init_ipv4 : unit -> Uwt.Udp.t uv_result
val init_ipv4_exn : unit -> Uwt.Udp.t
val init_ipv6 : unit -> Uwt.Udp.t uv_result
val init_ipv6_exn : unit -> Uwt.Udp.t
val openudp : Unix.file_descr -> Uwt.Udp.t uv_result
val openudp_exn : Unix.file_descr -> Uwt.Udp.t
type mode = Ipv6_only | Reuse_addr
val bind :
?mode:Uwt.Udp.mode list ->
Uwt.Udp.t -> addr:sockaddr -> unit -> Int_result.unit
val bind_exn :
?mode:Uwt.Udp.mode list -> Uwt.Udp.t -> addr:sockaddr -> unit -> unit
val getsockname : Uwt.Udp.t -> sockaddr uv_result
val getsockname_exn : Uwt.Udp.t -> sockaddr
type membership = Leave_group | Join_group
val set_membership :
?interface:string ->
Uwt.Udp.t ->
multicast:string -> Uwt.Udp.membership -> Int_result.unit
val set_membership_exn :
?interface:string ->
Uwt.Udp.t -> multicast:string -> Uwt.Udp.membership -> unit
val set_multicast_loop : Uwt.Udp.t -> bool -> Int_result.unit
val set_multicast_loop_exn : Uwt.Udp.t -> bool -> unit
val set_multicast_ttl : Uwt.Udp.t -> int -> Int_result.unit
val set_multicast_ttl_exn : Uwt.Udp.t -> int -> unit
val set_multicast_interface :
Uwt.Udp.t -> string option -> Int_result.unit
val set_multicast_interface_exn : Uwt.Udp.t -> string option -> unit
val set_broadcast : Uwt.Udp.t -> bool -> Int_result.unit
val set_broadcast_exn : Uwt.Udp.t -> bool -> unit
val set_ttl : Uwt.Udp.t -> int -> Int_result.unit
val set_ttl_exn : Uwt.Udp.t -> int -> unit
val send :
?pos:int ->
?len:int -> buf:bytes -> Uwt.Udp.t -> sockaddr -> unit Lwt.t
val send_ba :
?pos:int ->
?len:int -> buf:buf -> Uwt.Udp.t -> sockaddr -> unit Lwt.t
val send_string :
?pos:int ->
?len:int -> buf:string -> Uwt.Udp.t -> sockaddr -> unit Lwt.t
val send_raw :
?pos:int ->
?len:int -> buf:bytes -> Uwt.Udp.t -> sockaddr -> unit Lwt.t
val send_raw_ba :
?pos:int ->
?len:int -> buf:buf -> Uwt.Udp.t -> sockaddr -> unit Lwt.t
val send_raw_string :
?pos:int ->
?len:int -> buf:string -> Uwt.Udp.t -> sockaddr -> unit Lwt.t
val try_send :
?pos:int ->
?len:int -> buf:bytes -> Uwt.Udp.t -> sockaddr -> Int_result.int
val try_send_ba :
?pos:int ->
?len:int -> buf:buf -> Uwt.Udp.t -> sockaddr -> Int_result.int
val try_send_string :
?pos:int ->
?len:int -> buf:string -> Uwt.Udp.t -> sockaddr -> Int_result.int
val try_sendv :
Uwt.Udp.t -> Iovec_write.t list -> sockaddr -> Int_result.int
val sendv_raw :
Uwt.Udp.t -> Iovec_write.t list -> sockaddr -> unit Lwt.t
val sendv : Uwt.Udp.t -> Iovec_write.t list -> sockaddr -> unit Lwt.t
type recv_result =
Data of Bytes.t * sockaddr option
| Partial_data of Bytes.t * sockaddr option
| Empty_from of sockaddr
| Transmission_error of error
val recv_start :
Uwt.Udp.t -> cb:(Uwt.Udp.recv_result -> unit) -> Int_result.unit
val recv_start_exn :
Uwt.Udp.t -> cb:(Uwt.Udp.recv_result -> unit) -> unit
val recv_stop : Uwt.Udp.t -> Int_result.unit
val recv_stop_exn : Uwt.Udp.t -> unit
type recv = {
recv_len : int;
is_partial : bool;
sockaddr : sockaddr option;
}
val recv :
?pos:int -> ?len:int -> buf:bytes -> Uwt.Udp.t -> Uwt.Udp.recv Lwt.t
val recv_ba :
?pos:int -> ?len:int -> buf:buf -> Uwt.Udp.t -> Uwt.Udp.recv Lwt.t
end
module Tty :
sig
type t
val close : t -> Int_result.unit
val close_noerr : t -> unit
val close_wait : t -> unit Lwt.t
val is_active : t -> bool
val ref' : t -> unit
val unref : t -> unit
val has_ref : t -> bool
val to_handle : t -> Handle.t
val is_readable : t -> bool
val is_writable : t -> bool
val read_start : t -> cb:(Bytes.t uv_result -> unit) -> Int_result.unit
val read_start_exn : t -> cb:(Bytes.t uv_result -> unit) -> unit
val read_stop : t -> Int_result.unit
val read_stop_exn : t -> unit
val read : ?pos:int -> ?len:int -> t -> buf:bytes -> int Lwt.t
val read_ba : ?pos:int -> ?len:int -> t -> buf:buf -> int Lwt.t
val write_queue_size : t -> int
val try_write :
?pos:int -> ?len:int -> t -> buf:bytes -> Int_result.int
val try_write_ba :
?pos:int -> ?len:int -> t -> buf:buf -> Int_result.int
val try_write_string :
?pos:int -> ?len:int -> t -> buf:string -> Int_result.int
val write : ?pos:int -> ?len:int -> t -> buf:bytes -> unit Lwt.t
val write_string :
?pos:int -> ?len:int -> t -> buf:string -> unit Lwt.t
val write_ba : ?pos:int -> ?len:int -> t -> buf:buf -> unit Lwt.t
val write_raw : ?pos:int -> ?len:int -> t -> buf:bytes -> unit Lwt.t
val write_raw_string :
?pos:int -> ?len:int -> t -> buf:string -> unit Lwt.t
val write_raw_ba : ?pos:int -> ?len:int -> t -> buf:buf -> unit Lwt.t
val try_writev : t -> Iovec_write.t list -> Int_result.int
val writev : t -> Iovec_write.t list -> unit Lwt.t
val writev_emul : t -> Iovec_write.t list -> unit Lwt.t
val writev_raw : t -> Iovec_write.t list -> unit Lwt.t
val listen :
t -> max:int -> cb:(t -> Int_result.unit -> unit) -> Int_result.unit
val listen_exn :
t -> max:int -> cb:(t -> Int_result.unit -> unit) -> unit
val shutdown : t -> unit Lwt.t
val set_blocking : t -> bool -> Int_result.unit
val fileno : t -> Unix.file_descr uv_result
val fileno_exn : t -> Unix.file_descr
val to_stream : Uwt.Tty.t -> Uwt.Stream.t
val init : file -> read:bool -> Uwt.Tty.t uv_result
val init_exn : file -> read:bool -> Uwt.Tty.t
type mode = Normal | Raw | Io
val set_mode : Uwt.Tty.t -> mode:Uwt.Tty.mode -> Int_result.unit
val set_mode_exn : Uwt.Tty.t -> mode:Uwt.Tty.mode -> unit
val reset_mode : unit -> Int_result.unit
val reset_mode_exn : unit -> unit
type winsize = { width : int; height : int; }
val get_winsize : Uwt.Tty.t -> Uwt.Tty.winsize uv_result
val get_winsize_exn : Uwt.Tty.t -> Uwt.Tty.winsize
end
module Pipe :
sig
type t
val close : t -> Int_result.unit
val close_noerr : t -> unit
val close_wait : t -> unit Lwt.t
val is_active : t -> bool
val ref' : t -> unit
val unref : t -> unit
val has_ref : t -> bool
val to_handle : t -> Handle.t
val is_readable : t -> bool
val is_writable : t -> bool
val read_start : t -> cb:(Bytes.t uv_result -> unit) -> Int_result.unit
val read_start_exn : t -> cb:(Bytes.t uv_result -> unit) -> unit
val read_stop : t -> Int_result.unit
val read_stop_exn : t -> unit
val read : ?pos:int -> ?len:int -> t -> buf:bytes -> int Lwt.t
val read_ba : ?pos:int -> ?len:int -> t -> buf:buf -> int Lwt.t
val write_queue_size : t -> int
val try_write :
?pos:int -> ?len:int -> t -> buf:bytes -> Int_result.int
val try_write_ba :
?pos:int -> ?len:int -> t -> buf:buf -> Int_result.int
val try_write_string :
?pos:int -> ?len:int -> t -> buf:string -> Int_result.int
val write : ?pos:int -> ?len:int -> t -> buf:bytes -> unit Lwt.t
val write_string :
?pos:int -> ?len:int -> t -> buf:string -> unit Lwt.t
val write_ba : ?pos:int -> ?len:int -> t -> buf:buf -> unit Lwt.t
val write_raw : ?pos:int -> ?len:int -> t -> buf:bytes -> unit Lwt.t
val write_raw_string :
?pos:int -> ?len:int -> t -> buf:string -> unit Lwt.t
val write_raw_ba : ?pos:int -> ?len:int -> t -> buf:buf -> unit Lwt.t
val try_writev : t -> Iovec_write.t list -> Int_result.int
val writev : t -> Iovec_write.t list -> unit Lwt.t
val writev_emul : t -> Iovec_write.t list -> unit Lwt.t
val writev_raw : t -> Iovec_write.t list -> unit Lwt.t
val listen :
t -> max:int -> cb:(t -> Int_result.unit -> unit) -> Int_result.unit
val listen_exn :
t -> max:int -> cb:(t -> Int_result.unit -> unit) -> unit
val shutdown : t -> unit Lwt.t
val set_blocking : t -> bool -> Int_result.unit
val get_send_buffer_size : t -> Int_result.int
val get_send_buffer_size_exn : t -> int
val get_recv_buffer_size : t -> Int_result.int
val get_recv_buffer_size_exn : t -> int
val set_send_buffer_size : t -> int -> Int_result.unit
val set_send_buffer_size_exn : t -> int -> unit
val set_recv_buffer_size : t -> int -> Int_result.unit
val set_recv_buffer_size_exn : t -> int -> unit
val fileno : t -> Unix.file_descr uv_result
val fileno_exn : t -> Unix.file_descr
val to_stream : Uwt.Pipe.t -> Uwt.Stream.t
val init : ?ipc:bool -> unit -> Uwt.Pipe.t
val openpipe : ?ipc:bool -> Unix.file_descr -> Uwt.Pipe.t uv_result
val openpipe_exn : ?ipc:bool -> Unix.file_descr -> Uwt.Pipe.t
val bind : Uwt.Pipe.t -> path:string -> Int_result.unit
val bind_exn : Uwt.Pipe.t -> path:string -> unit
val getsockname : Uwt.Pipe.t -> string uv_result
val getsockname_exn : Uwt.Pipe.t -> string
val getpeername : Uwt.Pipe.t -> string uv_result
val getpeername_exn : Uwt.Pipe.t -> string
val pending_instances : Uwt.Pipe.t -> int -> Int_result.unit
val pending_instances_exn : Uwt.Pipe.t -> int -> unit
val accept : Uwt.Pipe.t -> Uwt.Pipe.t uv_result
val accept_exn : Uwt.Pipe.t -> Uwt.Pipe.t
val accept_raw :
server:Uwt.Pipe.t -> client:Uwt.Pipe.t -> Int_result.unit
val accept_raw_exn : server:Uwt.Pipe.t -> client:Uwt.Pipe.t -> unit
val pending_count : Uwt.Pipe.t -> Int_result.int
val pending_count_exn : Uwt.Pipe.t -> int
type ipc_result =
Ipc_error of error
| Ipc_none
| Ipc_tcp of Uwt.Tcp.t
| Ipc_udp of Uwt.Udp.t
| Ipc_pipe of Uwt.Pipe.t
val accept_ipc : Uwt.Pipe.t -> Uwt.Pipe.ipc_result
val write2 :
?pos:int ->
?len:int -> buf:bytes -> send:Uwt.Tcp.t -> Uwt.Pipe.t -> unit Lwt.t
val write2_ba :
?pos:int ->
?len:int -> buf:buf -> send:Uwt.Tcp.t -> Uwt.Pipe.t -> unit Lwt.t
val write2_string :
?pos:int ->
?len:int -> buf:string -> send:Uwt.Tcp.t -> Uwt.Pipe.t -> unit Lwt.t
val write2_pipe :
?pos:int ->
?len:int -> buf:bytes -> send:Uwt.Pipe.t -> Uwt.Pipe.t -> unit Lwt.t
val write2_pipe_ba :
?pos:int ->
?len:int -> buf:buf -> send:Uwt.Pipe.t -> Uwt.Pipe.t -> unit Lwt.t
val write2_pipe_string :
?pos:int ->
?len:int -> buf:string -> send:Uwt.Pipe.t -> Uwt.Pipe.t -> unit Lwt.t
val write2_udp :
?pos:int ->
?len:int -> buf:bytes -> send:Uwt.Udp.t -> Uwt.Pipe.t -> unit Lwt.t
val write2_udp_ba :
?pos:int ->
?len:int -> buf:buf -> send:Uwt.Udp.t -> Uwt.Pipe.t -> unit Lwt.t
val write2_udp_string :
?pos:int ->
?len:int -> buf:string -> send:Uwt.Udp.t -> Uwt.Pipe.t -> unit Lwt.t
val connect : Uwt.Pipe.t -> path:string -> unit Lwt.t
val with_pipe : ?ipc:bool -> (Uwt.Pipe.t -> 'a Lwt.t) -> 'a Lwt.t
val with_connect : path:string -> (Uwt.Pipe.t -> 'a Lwt.t) -> 'a Lwt.t
val with_open :
?ipc:bool -> Unix.file_descr -> (Uwt.Pipe.t -> 'a Lwt.t) -> 'a Lwt.t
type chmod = Pipe_readable | Pipe_writeable | Pipe_readable_writeable
val chmod : Uwt.Pipe.t -> Uwt.Pipe.chmod -> Int_result.unit
val chmod_exn : Uwt.Pipe.t -> Uwt.Pipe.chmod -> unit
end
module Timer :
sig
type t
val close : t -> Int_result.unit
val close_noerr : t -> unit
val close_wait : t -> unit Lwt.t
val is_active : t -> bool
val ref' : t -> unit
val unref : t -> unit
val has_ref : t -> bool
val to_handle : Uwt.Timer.t -> Uwt.Handle.t
val sleep : int -> unit Lwt.t
val start :
repeat:int ->
timeout:int -> cb:(Uwt.Timer.t -> unit) -> Uwt.Timer.t uv_result
val start_exn :
repeat:int -> timeout:int -> cb:(Uwt.Timer.t -> unit) -> Uwt.Timer.t
end
module Signal :
sig
type t
val close : t -> Int_result.unit
val close_noerr : t -> unit
val close_wait : t -> unit Lwt.t
val is_active : t -> bool
val ref' : t -> unit
val unref : t -> unit
val has_ref : t -> bool
val to_handle : Uwt.Signal.t -> Uwt.Handle.t
val sigbreak : int
val sigwinch : int
val start :
int -> cb:(Uwt.Signal.t -> int -> unit) -> Uwt.Signal.t uv_result
val start_exn : int -> cb:(Uwt.Signal.t -> int -> unit) -> Uwt.Signal.t
val oneshot : int -> unit Lwt.t
end
module Poll :
sig
type t
val close : t -> Int_result.unit
val close_noerr : t -> unit
val close_wait : t -> unit Lwt.t
val is_active : t -> bool
val ref' : t -> unit
val unref : t -> unit
val has_ref : t -> bool
val fileno : t -> Unix.file_descr uv_result
val fileno_exn : t -> Unix.file_descr
val to_handle : Uwt.Poll.t -> Uwt.Handle.t
type event = Readable | Writable | Disconnect | Prioritized
val start :
Unix.file_descr ->
Uwt.Poll.event list ->
cb:(Uwt.Poll.t -> Uwt.Poll.event list uv_result -> unit) ->
Uwt.Poll.t uv_result
val start_exn :
Unix.file_descr ->
Uwt.Poll.event list ->
cb:(Uwt.Poll.t -> Uwt.Poll.event list uv_result -> unit) ->
Uwt.Poll.t
val update_events :
Uwt.Poll.t -> Uwt.Poll.event list -> Int_result.unit
val update_events_exn : Uwt.Poll.t -> Uwt.Poll.event list -> unit
end
module Fs_event :
sig
type t
val close : t -> Int_result.unit
val close_noerr : t -> unit
val close_wait : t -> unit Lwt.t
val is_active : t -> bool
val ref' : t -> unit
val unref : t -> unit
val has_ref : t -> bool
val to_handle : Uwt.Fs_event.t -> Uwt.Handle.t
type event = Rename | Change
type flags = Entry | Stat | Recursive
type cb =
Uwt.Fs_event.t ->
(string * Uwt.Fs_event.event list) uv_result -> unit
val start :
string ->
Uwt.Fs_event.flags list ->
cb:Uwt.Fs_event.cb -> Uwt.Fs_event.t uv_result
val start_exn :
string ->
Uwt.Fs_event.flags list -> cb:Uwt.Fs_event.cb -> Uwt.Fs_event.t
end
module Fs_poll :
sig
type t
val close : t -> Int_result.unit
val close_noerr : t -> unit
val close_wait : t -> unit Lwt.t
val is_active : t -> bool
val ref' : t -> unit
val unref : t -> unit
val has_ref : t -> bool
val to_handle : Uwt.Fs_poll.t -> Uwt.Handle.t
type report = { prev : Uwt.Fs.stats; curr : Uwt.Fs.stats; }
val start :
string ->
int ->
cb:(Uwt.Fs_poll.t -> Uwt.Fs_poll.report uv_result -> unit) ->
Uwt.Fs_poll.t uv_result
val start_exn :
string ->
int ->
cb:(Uwt.Fs_poll.t -> Uwt.Fs_poll.report uv_result -> unit) ->
Uwt.Fs_poll.t
end
module Process :
sig
type t
val close : t -> Int_result.unit
val close_noerr : t -> unit
val close_wait : t -> unit Lwt.t
val is_active : t -> bool
val ref' : t -> unit
val unref : t -> unit
val has_ref : t -> bool
val to_handle : Uwt.Process.t -> Uwt.Handle.t
type stdio =
Inherit_file of file
| Create_pipe of Uwt.Pipe.t
| Inherit_pipe of Uwt.Pipe.t
| Inherit_stream of Uwt.Stream.t
| Create_pipe_read of Uwt.Pipe.t
| Create_pipe_write of Uwt.Pipe.t
| Create_pipe_duplex of Uwt.Pipe.t
type exit_cb =
Uwt.Process.t -> exit_status:int -> term_signal:int -> unit
val spawn :
?stdin:Uwt.Process.stdio ->
?stdout:Uwt.Process.stdio ->
?stderr:Uwt.Process.stdio ->
?uid:int ->
?gid:int ->
?verbatim_arguments:bool ->
?detach:bool ->
?hide:bool ->
?env:string list ->
?cwd:string ->
?exit_cb:Uwt.Process.exit_cb ->
string -> string list -> Uwt.Process.t uv_result
val spawn_exn :
?stdin:Uwt.Process.stdio ->
?stdout:Uwt.Process.stdio ->
?stderr:Uwt.Process.stdio ->
?uid:int ->
?gid:int ->
?verbatim_arguments:bool ->
?detach:bool ->
?hide:bool ->
?env:string list ->
?cwd:string ->
?exit_cb:Uwt.Process.exit_cb ->
string -> string list -> Uwt.Process.t
val disable_stdio_inheritance : unit -> unit
val pid : Uwt.Process.t -> Int_result.int
val pid_exn : Uwt.Process.t -> int
val process_kill : Uwt.Process.t -> int -> Int_result.unit
val process_kill_exn : Uwt.Process.t -> int -> unit
val kill : pid:int -> signum:int -> Int_result.unit
val kill_exn : pid:int -> signum:int -> unit
end
module Dns :
sig
type socket_domain = Unix.socket_domain
type socket_type = Unix.socket_type
type getaddrinfo_option = Unix.getaddrinfo_option
type addr_info =
Unix.addr_info = {
ai_family : Uwt.Dns.socket_domain;
ai_socktype : Uwt.Dns.socket_type;
ai_protocol : int;
ai_addr : sockaddr;
ai_canonname : string;
}
val getaddrinfo :
host:string ->
service:string ->
Uwt.Dns.getaddrinfo_option list ->
Unix.addr_info list uv_result Lwt.t
type getnameinfo_option = Unix.getnameinfo_option
val getnameinfo :
sockaddr ->
Uwt.Dns.getnameinfo_option list -> Unix.name_info uv_result Lwt.t
end
module Unix :
sig
val gethostname : unit -> string Lwt.t
val gethostbyname : string -> Unix.host_entry Lwt.t
val gethostbyaddr : Unix.inet_addr -> Unix.host_entry Lwt.t
val getservbyname :
name:string -> protocol:string -> Unix.service_entry Lwt.t
val getservbyport : int -> string -> Unix.service_entry Lwt.t
val getprotobyname : string -> Unix.protocol_entry Lwt.t
val getprotobynumber : int -> Unix.protocol_entry Lwt.t
val getlogin : unit -> string Lwt.t
val getpwnam : string -> Unix.passwd_entry Lwt.t
val getpwuid : int -> Unix.passwd_entry Lwt.t
val getgrnam : string -> Unix.group_entry Lwt.t
val getgrgid : int -> Unix.group_entry Lwt.t
val lseek : file -> int64 -> Unix.seek_command -> int64 Lwt.t
val getcwd : unit -> string Lwt.t
val chdir : string -> unit Lwt.t
val chroot : string -> unit Lwt.t
val lockf : file -> Unix.lock_command -> int64 -> unit Lwt.t
val sleep : float -> unit Lwt.t
val pipe : ?cloexec:bool -> unit -> (Uwt.Pipe.t * Uwt.Pipe.t) uv_result
val pipe_exn : ?cloexec:bool -> unit -> Uwt.Pipe.t * Uwt.Pipe.t
val realpath : string -> string Lwt.t
end
module C_worker :
sig
type t
type 'a u
val call :
('a -> 'b Uwt.C_worker.u -> Uwt.C_worker.t) -> 'a -> 'b Lwt.t
end
module Async :
sig
type t
val close : t -> Int_result.unit
val close_noerr : t -> unit
val close_wait : t -> unit Lwt.t
val is_active : t -> bool
val ref' : t -> unit
val unref : t -> unit
val has_ref : t -> bool
val to_handle : Uwt.Async.t -> Uwt.Handle.t
val create : (Uwt.Async.t -> unit) -> Uwt.Async.t uv_result
val start : Uwt.Async.t -> Int_result.unit
val stop : Uwt.Async.t -> Int_result.unit
val send : Uwt.Async.t -> Int_result.unit
end
module Debug :
sig
val print_all_handles : file -> Int_result.unit
val print_active_handles : file -> Int_result.unit
val valgrind_happy : unit -> unit
end
end