package procord

  1. Overview
  2. Docs
type 'a t
val connect : ?timeout:float -> ?ping:string -> string -> int -> 'a -> 'a t
val update : 'a t -> unit
type state =
  1. | Connecting
  2. | Connected
  3. | Disconnecting
  4. | Disconnected of (Unix.error * string * string) option
val state : 'a t -> state
val alive : 'a t -> bool
val send : 'a t -> string -> unit
val receive : 'a t -> int -> string option
val receive_poll : 'a t -> int -> int -> string option
val receive_poll_part : 'a t -> int -> int -> string
val receive_all : 'a t -> string
val receive_part : 'a t -> int -> string
val receive_forget : 'a t -> int -> unit
val receive_buffer_length : 'a t -> int
val receive_buffer_empty : 'a t -> bool
val close : 'a t -> unit
val close_nicely : ?timeout:float -> 'a t -> unit
val data : 'a t -> 'a
val timeout : 'a t -> float option
module Sync : sig ... end
val remote_address : 'a t -> Unix.sockaddr
val make_address : string -> Unix.inet_addr
type 'a set
val empty_set : unit -> 'a set
val accept_into_set : ?timeout:float -> ?ping:string -> Unix.file_descr -> (Unix.sockaddr -> 'a option) -> 'a set -> unit
val update_set : 'a set -> unit
val iter : 'a set -> ('a t -> unit) -> unit
type waiter
val waiter : 'a t -> waiter
val waiter_of_listening_socket : Unix.file_descr -> waiter
val waiter_of_set : 'a set -> waiter
val waiter_custom : ?read:Unix.file_descr list -> ?write:Unix.file_descr list -> ?except:Unix.file_descr list -> unit -> waiter
val waiter_of_list : waiter list -> waiter
val instanciate_waiter : waiter -> Unix.file_descr list * Unix.file_descr list * Unix.file_descr list
val wait : ?timeout:float -> waiter -> bool
val wait' : ?timeout:float -> waiter -> unit
val custom : ?timeout:float -> ?ping:string -> ?input:Unix.file_descr -> ?output:Unix.file_descr -> ?remote_address:Unix.sockaddr -> 'a -> 'a t
OCaml

Innovation. Community. Security.