package uwt

  1. Overview
  2. Docs
type t
val close : t -> Int_result.unit
val close_noerr : t -> unit
val close_wait : t -> unit Lwt.t
val is_active : t -> bool
val ref' : t -> unit
val unref : t -> unit
val has_ref : t -> bool
val get_send_buffer_size : t -> Int_result.int
val get_send_buffer_size_exn : t -> int
val get_recv_buffer_size : t -> Int_result.int
val get_recv_buffer_size_exn : t -> int
val set_send_buffer_size : t -> int -> Int_result.unit
val set_send_buffer_size_exn : t -> int -> unit
val set_recv_buffer_size : t -> int -> Int_result.unit
val set_recv_buffer_size_exn : t -> int -> unit
val fileno : t -> Unix.file_descr uv_result
val fileno_exn : t -> Unix.file_descr
val to_handle : t -> Handle.t
val send_queue_size : t -> int
val send_queue_count : t -> int
val init : unit -> t
val init_ipv4 : unit -> t uv_result
val init_ipv4_exn : unit -> t
val init_ipv6 : unit -> t uv_result
val init_ipv6_exn : unit -> t
val openudp : Unix.file_descr -> t uv_result
val openudp_exn : Unix.file_descr -> t
type mode =
  1. | Ipv6_only
  2. | Reuse_addr
val bind : ?mode:mode list -> t -> addr:sockaddr -> unit -> Int_result.unit
val bind_exn : ?mode:mode list -> t -> addr:sockaddr -> unit -> unit
val getsockname : t -> sockaddr uv_result
val getsockname_exn : t -> sockaddr
type membership =
  1. | Leave_group
  2. | Join_group
val set_membership : ?interface:string -> t -> multicast:string -> membership -> Int_result.unit
val set_membership_exn : ?interface:string -> t -> multicast:string -> membership -> unit
val set_multicast_loop : t -> bool -> Int_result.unit
val set_multicast_loop_exn : t -> bool -> unit
val set_multicast_ttl : t -> int -> Int_result.unit
val set_multicast_ttl_exn : t -> int -> unit
val set_multicast_interface : t -> string option -> Int_result.unit
val set_multicast_interface_exn : t -> string option -> unit
val set_broadcast : t -> bool -> Int_result.unit
val set_broadcast_exn : t -> bool -> unit
val set_ttl : t -> int -> Int_result.unit
val set_ttl_exn : t -> int -> unit
val send : ?pos:int -> ?len:int -> buf:bytes -> t -> sockaddr -> unit Lwt.t
val send_ba : ?pos:int -> ?len:int -> buf:buf -> t -> sockaddr -> unit Lwt.t
val send_string : ?pos:int -> ?len:int -> buf:string -> t -> sockaddr -> unit Lwt.t
val send_raw : ?pos:int -> ?len:int -> buf:bytes -> t -> sockaddr -> unit Lwt.t
val send_raw_ba : ?pos:int -> ?len:int -> buf:buf -> t -> sockaddr -> unit Lwt.t
val send_raw_string : ?pos:int -> ?len:int -> buf:string -> t -> sockaddr -> unit Lwt.t
val try_send : ?pos:int -> ?len:int -> buf:bytes -> t -> sockaddr -> Int_result.int
val try_send_ba : ?pos:int -> ?len:int -> buf:buf -> t -> sockaddr -> Int_result.int
val try_send_string : ?pos:int -> ?len:int -> buf:string -> t -> sockaddr -> Int_result.int
val try_sendv : t -> Iovec_write.t list -> sockaddr -> Int_result.int
val sendv_raw : t -> Iovec_write.t list -> sockaddr -> unit Lwt.t
val sendv : t -> Iovec_write.t list -> sockaddr -> unit Lwt.t
type recv_result =
  1. | Data of Bytes.t * sockaddr option
  2. | Partial_data of Bytes.t * sockaddr option
  3. | Empty_from of sockaddr
  4. | Transmission_error of error
val recv_start : t -> cb:(recv_result -> unit) -> Int_result.unit
val recv_start_exn : t -> cb:(recv_result -> unit) -> unit
val recv_stop : t -> Int_result.unit
val recv_stop_exn : t -> unit
type recv = {
  1. recv_len : int;
  2. is_partial : bool;
  3. sockaddr : sockaddr option;
}
val recv : ?pos:int -> ?len:int -> buf:bytes -> t -> recv Lwt.t
val recv_ba : ?pos:int -> ?len:int -> buf:buf -> t -> recv Lwt.t
OCaml

Innovation. Community. Security.