eio icon indicating copy to clipboard operation
eio copied to clipboard

add Eio_unix.Sockopt for setting/getting socket options

Open avsm opened this issue 1 year ago • 1 comments

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.

avsm avatar Jul 07 '23 18:07 avsm