package uwt

  1. Overview
  2. Docs
type file_descr
val to_file_descr : [ `File of Uwt.file | `Pipe of Uwt.Pipe.t | `Tcp of Uwt.Tcp.t | `Udp of Uwt.Udp.t ] -> file_descr
val from_file_descr : file_descr -> [ `File of Uwt.file | `Pipe of Uwt.Pipe.t | `Tcp of Uwt.Tcp.t | `Udp of Uwt.Udp.t ]
type dir_handle
type process_status = Unix.process_status =
  1. | WEXITED of int
  2. | WSIGNALED of int
  3. | WSTOPPED of int
type wait_flag = Unix.wait_flag =
  1. | WNOHANG
  2. | WUNTRACED
type file_perm = Unix.file_perm
type open_flag = Unix.open_flag =
  1. | O_RDONLY
  2. | O_WRONLY
  3. | O_RDWR
  4. | O_NONBLOCK
  5. | O_APPEND
  6. | O_CREAT
  7. | O_TRUNC
  8. | O_EXCL
  9. | O_NOCTTY
  10. | O_DSYNC
  11. | O_SYNC
  12. | O_RSYNC
  13. | O_SHARE_DELETE
  14. | O_CLOEXEC
  15. | O_KEEPEXEC
type seek_command = Unix.seek_command =
  1. | SEEK_SET
  2. | SEEK_CUR
  3. | SEEK_END
type file_kind = Unix.file_kind
type stats = Unix.stats = {
  1. st_dev : int;
  2. st_ino : int;
  3. st_kind : file_kind;
  4. st_perm : file_perm;
  5. st_uid : int;
  6. st_gid : int;
  7. st_rdev : int;
  8. st_size : int;
  9. st_atime : float;
  10. st_mtime : float;
  11. st_ctime : float;
}
type access_permission = Unix.access_permission =
  1. | R_OK
  2. | W_OK
  3. | X_OK
  4. | F_OK
type inet_addr = Unix.inet_addr
type socket_domain = Unix.socket_domain =
  1. | PF_UNIX
  2. | PF_INET
  3. | PF_INET6
type socket_type = Unix.socket_type =
  1. | SOCK_STREAM
  2. | SOCK_DGRAM
  3. | SOCK_RAW
  4. | SOCK_SEQPACKET
type sockaddr = Unix.sockaddr =
  1. | ADDR_UNIX of string
  2. | ADDR_INET of inet_addr * int
type shutdown_command = Unix.shutdown_command =
  1. | SHUTDOWN_RECEIVE
  2. | SHUTDOWN_SEND
  3. | SHUTDOWN_ALL
type msg_flag = Unix.msg_flag =
  1. | MSG_OOB
  2. | MSG_DONTROUTE
  3. | MSG_PEEK
type socket_bool_option = Unix.socket_bool_option =
  1. | SO_DEBUG
  2. | SO_BROADCAST
  3. | SO_REUSEADDR
  4. | SO_KEEPALIVE
  5. | SO_DONTROUTE
  6. | SO_OOBINLINE
  7. | SO_ACCEPTCONN
  8. | TCP_NODELAY
  9. | IPV6_ONLY
type socket_int_option = Unix.socket_int_option =
  1. | SO_SNDBUF
  2. | SO_RCVBUF
  3. | SO_ERROR
  4. | SO_TYPE
  5. | SO_RCVLOWAT
  6. | SO_SNDLOWAT
type socket_optint_option = Unix.socket_optint_option =
  1. | SO_LINGER
type socket_float_option = Unix.socket_float_option =
  1. | SO_RCVTIMEO
  2. | SO_SNDTIMEO
type host_entry = Unix.host_entry = {
  1. h_name : string;
  2. h_aliases : string array;
  3. h_addrtype : socket_domain;
  4. h_addr_list : inet_addr array;
}
type protocol_entry = Unix.protocol_entry = {
  1. p_name : string;
  2. p_aliases : string array;
  3. p_proto : int;
}
type service_entry = Unix.service_entry = {
  1. s_name : string;
  2. s_aliases : string array;
  3. s_port : int;
  4. s_proto : string;
}
type addr_info = Unix.addr_info = {
  1. ai_family : socket_domain;
  2. ai_socktype : socket_type;
  3. ai_protocol : int;
  4. ai_addr : sockaddr;
  5. ai_canonname : string;
}
type getaddrinfo_option = Unix.getaddrinfo_option =
  1. | AI_FAMILY of socket_domain
  2. | AI_SOCKTYPE of socket_type
  3. | AI_PROTOCOL of int
  4. | AI_NUMERICHOST
  5. | AI_CANONNAME
  6. | AI_PASSIVE
type name_info = Unix.name_info = {
  1. ni_hostname : string;
  2. ni_service : string;
}
type getnameinfo_option = Unix.getnameinfo_option =
  1. | NI_NOFQDN
  2. | NI_NUMERICHOST
  3. | NI_NAMEREQD
  4. | NI_NUMERICSERV
  5. | NI_DGRAM
type terminal_io = Unix.terminal_io = {
  1. mutable c_ignbrk : bool;
  2. mutable c_brkint : bool;
  3. mutable c_ignpar : bool;
  4. mutable c_parmrk : bool;
  5. mutable c_inpck : bool;
  6. mutable c_istrip : bool;
  7. mutable c_inlcr : bool;
  8. mutable c_igncr : bool;
  9. mutable c_icrnl : bool;
  10. mutable c_ixon : bool;
  11. mutable c_ixoff : bool;
  12. mutable c_opost : bool;
  13. mutable c_obaud : int;
  14. mutable c_ibaud : int;
  15. mutable c_csize : int;
  16. mutable c_cstopb : int;
  17. mutable c_cread : bool;
  18. mutable c_parenb : bool;
  19. mutable c_parodd : bool;
  20. mutable c_hupcl : bool;
  21. mutable c_clocal : bool;
  22. mutable c_isig : bool;
  23. mutable c_icanon : bool;
  24. mutable c_noflsh : bool;
  25. mutable c_echo : bool;
  26. mutable c_echoe : bool;
  27. mutable c_echok : bool;
  28. mutable c_echonl : bool;
  29. mutable c_vintr : char;
  30. mutable c_vquit : char;
  31. mutable c_verase : char;
  32. mutable c_vkill : char;
  33. mutable c_veof : char;
  34. mutable c_veol : char;
  35. mutable c_vmin : int;
  36. mutable c_vtime : int;
  37. mutable c_vstart : char;
  38. mutable c_vstop : char;
}
type setattr_when = Unix.setattr_when =
  1. | TCSANOW
  2. | TCSADRAIN
  3. | TCSAFLUSH
type flush_queue = Unix.flush_queue =
  1. | TCIFLUSH
  2. | TCOFLUSH
  3. | TCIOFLUSH
val handle_unix_error : ('a -> 'b Lwt.t) -> 'a -> 'b Lwt.t
val sleep : float -> unit Lwt.t
val yield : unit -> unit Lwt.t
val auto_yield : float -> unit -> unit Lwt.t
exception Timeout
val timeout : float -> 'a Lwt.t
val with_timeout : float -> (unit -> 'a Lwt.t) -> 'a Lwt.t
val stdin : file_descr
val stdout : file_descr
val stderr : file_descr
val openfile : string -> Unix.open_flag list -> file_perm -> file_descr Lwt.t
val close : file_descr -> unit Lwt.t
val read : file_descr -> bytes -> int -> int -> int Lwt.t
val write : file_descr -> bytes -> int -> int -> int Lwt.t
val write_string : file_descr -> string -> int -> int -> int Lwt.t
val lseek : file_descr -> int -> Unix.seek_command -> int Lwt.t
val truncate : string -> int -> unit Lwt.t
val ftruncate : file_descr -> int -> unit Lwt.t
val fsync : file_descr -> unit Lwt.t
val fdatasync : file_descr -> unit Lwt.t
val stat : string -> Unix.stats Lwt.t
val lstat : string -> Unix.stats Lwt.t
val fstat : file_descr -> Unix.stats Lwt.t
val isatty : file_descr -> bool Lwt.t
val file_exists : string -> bool Lwt.t
module LargeFile : sig ... end
val rename : string -> string -> unit Lwt.t
val chmod : string -> file_perm -> unit Lwt.t
val fchmod : file_descr -> file_perm -> unit Lwt.t
val chown : string -> int -> int -> unit Lwt.t
val fchown : file_descr -> int -> int -> unit Lwt.t
val access : string -> Unix.access_permission list -> unit Lwt.t
val mkdir : string -> file_perm -> unit Lwt.t
val rmdir : string -> unit Lwt.t
val opendir : string -> dir_handle Lwt.t
val readdir : dir_handle -> string Lwt.t
val readdir_n : dir_handle -> int -> string array Lwt.t
val closedir : dir_handle -> unit Lwt.t
val files_of_directory : string -> string Lwt_stream.t
val getlogin : unit -> string Lwt.t
val getpwnam : string -> Unix.passwd_entry Lwt.t
val getgrnam : string -> Unix.group_entry Lwt.t
val getpwuid : int -> Unix.passwd_entry Lwt.t
val getgrgid : int -> Unix.group_entry Lwt.t
val chdir : string -> unit Lwt.t
val chroot : string -> unit Lwt.t
val getcwd : unit -> string Lwt.t
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 getprotobyname : string -> Unix.protocol_entry Lwt.t
val getprotobynumber : int -> Unix.protocol_entry Lwt.t
val getservbyname : string -> string -> Unix.service_entry Lwt.t
val getservbyport : int -> string -> Unix.service_entry Lwt.t
val getaddrinfo : string -> string -> Unix.getaddrinfo_option list -> Unix.addr_info list Lwt.t
val pipe : unit -> file_descr * file_descr
val pipe_in : unit -> file_descr * Unix.file_descr
val pipe_out : unit -> Unix.file_descr * file_descr
val system : string -> Unix.process_status Lwt.t
val utimes : string -> float -> float -> unit Lwt.t
type signal_handler_id
val on_signal : int -> (int -> unit) -> signal_handler_id
val on_signal_full : int -> (signal_handler_id -> int -> unit) -> signal_handler_id
val disable_signal_handler : signal_handler_id -> unit