eio
eio copied to clipboard
add Eio_unix.Sockopt for setting/getting socket options
There are some socket options that are Linux-specific which are quite handy to have. This adds a Eio_unix.Sockopt module which works on Eio_unix.Fd.t values.
This is a draft PR to check on the interface: the current PR replaces the need for Unix.setsockopt and has a single simple GADT for the socket options. Alternatively we could just expose the extended ones in the same style as upstream OCaml as a separate set of types, too. Opinions welcome.