Directly use Happy_eyeballs_lwt instead of a copy of it (#346)
* Directly use Happy_eyeballs_lwt instead of a copy of it
This commit delete a dependency cycle between happy-eyeballs,
happy-eyeballs-lwt, dns and dns-client-lwt. The basic happy-eyeballs-lwt
implementation is not able yet to resolve domain-name but the user can
inject a getaddrinfo which may come from dns-client-lwt. The idea is:
1) create a happy-eyeballs-lwt instance
2) create a dns-client-lwt instance
3) inject Dns_client_lwt.getaddrinfo into our happy-eyeballs-lwt
instance
This patch delete a duplicate code about happy-eyeballs implementations.
* Add happy-eyeballs with the .dev version to satisfy the OPAM solver
* Remove useless he_timer_interval into dns-client-lwt
* Update tools with the new intf. of dns-client-lwt
* Use the happy-eyeballs impl. which use Unix.getaddrinfo as the default
resolver and provide a new function, [create_happy_eyeballs], which does
the injection of the [ocaml-dns] DNS resolver.
* more
* adapt opam
* minor
* adjust docstring
* dns-client-mirage: use happy-eyeballs-mirage
* add he deps
* minor nit
* [WIP] a possible solution for happy-eyeballs/ocaml-dns and mirage
* adapt to intentioned use case
* dns-client-mirage: use connect_timeout for connecting to the remote
* Remove the optional argument of happy-eyeballs for dns-client-mirage
* remove unneeded types and values
* adapt dns-client-lwt to the dns-client-mirage interface
---------
Co-authored-by: Hannes Mehnert <hannes@mehnert.org>
223801
-
May 29 16:46 +00:00