val return : 'a -> 'a t
val open_socket : ?config:config -> inet_addr -> int -> file_descr t
val close_socket : file_descr -> unit t
val read : file_descr -> Stdlib.Bytes.t -> int -> int -> int t
val write : file_descr -> Stdlib.Bytes.t -> int -> int -> int t
val read_with_timeout : timeout:int -> file_descr -> Stdlib.Bytes.t -> int -> int -> int option t
read_with_timeout ~timeout fd buf off len
returns Some n
if it could read n
bytes into buf
(slice off,...,off+len-1
), or None
if nothing was read before timeout
seconds.
List of IPs that correspond to the given hostname (or an empty list if none is found)
val sleep : int -> unit t
Current wall time (used for timeouts). Typically, Unix.time
.
- since
- NEXT_RELEASE