eio
eio copied to clipboard
Support for socket options
Right now both Eio.Net.{connect,accept}
return a socket, but I didn't find a way to e.g. set TCP_NODELAY
on the stream socket. Did I miss an API?
Looks like it's missing, indeed.
I was using it originally with the HTTP benchmark, but now that sends everything in a single packet it doesn't make any difference there.
As a work-around, you can of course get the FD directly:
Unix.setsockopt (Eio_unix.FD.peek_opt ssock |> Option.get) Unix.TCP_NODELAY true;