package sonet

  1. Overview
  2. Docs
type t
val compare : t -> t -> int
val hash : t -> int
type callbacks = {
  1. connect_callback : t -> unit;
  2. recv_callback : t -> string -> int -> int -> unit;
  3. send_done_callback : t -> unit;
  4. shutdown_callback : t -> unit;
  5. error_callback : t -> Eventloop.error -> unit;
}
val attach : Eventloop.t -> Unix.file_descr -> ?enable_send_done:bool -> ?enable_recv:bool -> callbacks -> t
val detach : t -> unit
val close : t -> unit
val enable_send_done : t -> unit
val disable_send_done : t -> unit
val enable_recv : t -> unit
val disable_recv : t -> unit
val connect : t -> Unix.sockaddr -> unit
val send : t -> string -> unit
val send_substring : t -> string -> int -> int -> unit
val send_buffer : t -> Buffer.t -> unit
val has_pending_send : t -> bool
val set_callbacks : t -> callbacks -> unit
val get_handle : t -> Eventloop.handle
val get_eventloop : t -> Eventloop.t
val get_fd : t -> Unix.file_descr
val get_send_buf : t -> Buffer.t
OCaml

Innovation. Community. Security.