package riot

  1. Overview
  2. Docs
type unix_error = [
  1. | `Unix_error of Unix.error
]
type ('ok, 'err) result = ('ok, [> unix_error ] as 'err) Stdlib.result
module Buffer : sig ... end
type read = [
  1. | `Abort of Unix.error
  2. | `Read of int
  3. | `Retry
]
type write = [
  1. | `Abort of Unix.error
  2. | `Retry
  3. | `Wrote of int
]
val read : Fd.t -> bytes -> int -> int -> read
val write : Fd.t -> bytes -> int -> int -> write
val await_readable : Fd.t -> (Fd.t -> 'a) -> 'a
val await_writeable : Fd.t -> (Fd.t -> 'a) -> 'a
val await : Fd.t -> Fd.Mode.t -> (Fd.t -> 'a) -> 'a
val single_read : Fd.t -> buf:Buffer.t -> (int, [> `Closed ]) result
val single_write : Fd.t -> data:Buffer.t -> (int, [> `Closed ]) result
module type Write = sig ... end
module Writer : sig ... end
module type Read = sig ... end
module Reader : sig ... end
val write_all : 'dst Writer.t -> data:Buffer.t -> (int, [> `Closed | `Eof ]) result
val copy_buffered : 'src Reader.Buffered.t Reader.t -> 'dst Writer.t -> (int, [> `Closed | `Eof ]) result
val copy : ?buf:Buffer.t -> 'src Reader.t -> 'dst Writer.t -> (int, [> `Closed | `Eof ]) result
OCaml

Innovation. Community. Security.