(lang dune 3.21)
(using mdx 0.4)
(name nox-happy-eyeballs)
(source (github robur-coop/happy-eyeballs))
(license ISC)
(authors
 "Robur <team@robur.coop>"
 "Hannes Mehnert <hannes@mehnert.org>"
 "Thomas Gazagnaire <thomas@gazagnaire.org>")
(maintainers
 "Thomas Gazagnaire <thomas@gazagnaire.org>")

(generate_opam_files true)
(implicit_transitive_deps false)

(package
 (name nox-happy-eyeballs)
 (synopsis "Happy Eyeballs (RFC 8305) connection establishment, I/O-free core")
 (description
  "WARNING: This is an experimental fork of happy-eyeballs. Do not use in production. Use happy-eyeballs instead: https://github.com/robur-coop/happy-eyeballs. An implementation of the Happy Eyeballs algorithm (RFC 8305): given a host with both IPv4 (A) and IPv6 (AAAA) addresses, race the candidate connections and prefer IPv6, so a slow or broken address family does not stall the connection. The core is in value-passing style and does no I/O: it takes time as a parameter and emits actions for an effectful layer to perform. Derived from robur-coop/happy-eyeballs; the nox-happy-eyeballs-eio package wires it onto Eio sockets.")
 (tags (org:blacksun org:robur network))
 (depends
  (ocaml (>= 4.14.0))
  (dune (>= 3.0))
  duration
  (domain-name (>= 0.2.0))
  (ipaddr (>= 5.2.0))
  (fmt (>= 0.8.7))
  logs
  (alcotest :with-test)))

(package
 (name nox-happy-eyeballs-eio)
 (synopsis "Eio backend for nox-happy-eyeballs")
 (description
  "An Eio backend over the nox-happy-eyeballs connection state machine: a timer runs as a fiber and the connection candidates race as sibling fibers, with the losers cancelled as soon as one connects. Name resolution is injectable and defaults to Eio.Net.getaddrinfo; the caller can supply a pure-OCaml resolver instead.")
 (tags (org:blacksun org:robur network eio))
 (depends
  (ocaml (>= 5.1))
  (dune (>= 3.0))
  nox-happy-eyeballs
  eio
  ipaddr
  domain-name
  duration
  fmt
  logs
  (alcotest :with-test)
  (alcobar :with-test)
  (eio_main :with-test)
  (mdx :with-test)
  eio-net))
