aantron / luv

Cross-platform asynchronous I/O and system calls
https://aantron.github.io/luv
MIT License
274 stars 26 forks source link

Restore (or add) Luv/Unix sockaddr conversions #92

Open aantron opened 3 years ago

aantron commented 3 years ago

...also needed for ocsigen/lwt#813.

zbaylin commented 3 years ago

Hey @aantron -- is there any way I can help with this? Not sure if you remember but I'm interested in this as well for using luv with ocurl and it looks like the requisite functions (uv_pipe & uv_socketpair) are in now.

Let me know if there is anything I can do!

cc @bryphe

aantron commented 3 years ago

I just merged in a branch that restores the Luv/Unix fd conversions in a module Luv.Unix. You should be able to add sockaddr conversions in that module as well, probably in a new submodule module Sockaddr : (* ... *), parallel to Os_fd. It's probably best to do the conversions at the C level, using the functions in caml/socketaddr.h. See luv_unix.c.

I can also add them myself, but a bit later, as I am currently loaded with some other work :/