Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for socket options #322

Open
anmonteiro opened this issue Sep 23, 2022 · 3 comments
Open

Support for socket options #322

anmonteiro opened this issue Sep 23, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@anmonteiro
Copy link
Contributor

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?

@talex5
Copy link
Collaborator

talex5 commented Sep 24, 2022

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;

@talex5
Copy link
Collaborator

talex5 commented Oct 2, 2024

Note there is an old draft PR related to this at #575.

Getting that rebased onto the current main branch would be a good start.

@talex5
Copy link
Collaborator

talex5 commented Oct 2, 2024

Yes, I think that PR was going in the right direction. It looks like it just never got finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants