package happy-eyeballs-lwt

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t

The type of the abstract state of happy eyeballs.

val create : ?aaaa_timeout:int64 -> ?connect_timeout:int64 -> ?resolve_timeout:int64 -> ?timer_interval:int64 -> unit -> t

create ~aaaa_timeout ~connect_timeout ~resolve_timeout ~timer_interval () creates an initial state of happy eyeballs with the specified timeouts in nanoseconds - the default for timer_interval is Duration.of_ms 10.

val connect_host : t -> [ `host ] Domain_name.t -> int list -> ((Ipaddr.t * int) * Lwt_unix.file_descr, [ `Msg of string ]) result Lwt.t

connect_host t host ports establishes a connection to host on ports (tried in sequence).

val connect_ip : t -> (Ipaddr.t * int) list -> ((Ipaddr.t * int) * Lwt_unix.file_descr, [ `Msg of string ]) result Lwt.t

connect_ip t addresses establishes a connection to addresses.

  • raises Failure

    if addresses is the empty list.

val connect : t -> string -> int list -> ((Ipaddr.t * int) * Lwt_unix.file_descr, [ `Msg of string ]) result Lwt.t

connect t host ports establishes a connection to host on ports, which may be a host name, or an IP address.

  • raises Failure

    if ports is the empty list.

OCaml

Innovation. Community. Security.