package riot

  1. Overview
  2. Docs
type t
type accept = [
  1. | `Abort of Unix.error
  2. | `Connected of Socket.stream_socket * Addr.stream_addr
  3. | `Retry
]
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 create : unit -> t
val pp : Format.formatter -> t -> unit
val register : t -> Core.Process.t -> [ `r | `rw | `w ] -> Util.Fd.t -> unit
val unregister_process : t -> Core.Process.t -> unit
val poll : t -> ((Core.Process.t * Util.Fd.Mode.t) -> unit) -> unit
val close : t -> Util.Fd.t -> unit
val getaddrinfo : string -> string -> [> `Abort of Unix.error | `Ok of Unix.addr_info list | `Retry ]
val listen : t -> reuse_addr:bool -> reuse_port:bool -> backlog:int -> Addr.stream_addr -> (Util.Fd.t, 'a) result
val connect : t -> Addr.stream_addr -> [> `Abort of Unix.error | `Connected of Util.Fd.t | `In_progress of Util.Fd.t | `Retry ]
val accept : t -> Util.Fd.t -> accept
val read : Socket.stream_socket -> bytes -> int -> int -> read
val write : Socket.stream_socket -> bytes -> int -> int -> write
OCaml

Innovation. Community. Security.