DNS utility functions
Hi! First off, thanks for the amazing work in eio!
I'd like to have an API for uv_getaddrinfo and uv_getnameinfo. Luv has bindings to these on their DNS module: https://github.com/aantron/luv/blob/0ed668e87ca55d65f4f84422b0dd3381701c71b0/src/DNS.ml
If this feature is welcome in eio, I'd gladly send a PR.
Yes please! For uring, something like this could be used:
Eio_unix.run_in_systhread (fun () -> Unix.gethostbyaddr name)
There is a whole family of these get* functions in OCaml's Unix module. I'm not sure how many are useful. The types will need to be wrapped, because Eio.Net can't depend on Unix (it has to work on non-Unix platforms like MirageOS too).
Note: getaddrinfo was added in #278. Do we need getnameinfo too?
Hi, sorry for not following up on this. I've written an implementation for my use case but couldn't settle on a good enough "universal" API to fit in Eio.
he implementation of #278 doesn't support all the features of getaddrinfo but its enough for most of the cases (including mine), so I guess its fine. I don't really need getnameinfo.
OK, thanks for confirming!