-
Notifications
You must be signed in to change notification settings - Fork 72
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
Add setsockopt() to eio sockets #365
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't reason much about why changing the type declaration to classes, it seems to be a change for the sake of change ? Or what am I missing. If so, it would make more sense to put those on a different commit to make reviewer easier.
Since you're providing setsockopt
, should we provide getsockopt
as well ?
ff67de2
to
3b5a8c2
Compare
Indeed, I was thinking along the same lines but wanted to get this PR reviewed and merged first. I have opened issue #376 for this. |
920912c
to
8e565b0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not actually necessary to create a separate Mock.Net.stream_socket
type (which is an API change). We could just have Flow.t
implement the socket methods too. It already works as both a source and a sink, for example.
We could just add the new method to the implementations in eio_linux, etc, rather than using inheritance, to shrink the PR. Though this seems fine to me either way.
cf51b49
to
4b64c2a
Compare
Indeed, this is an api change; however, I think this api addition should be mostly backwards compatible since I am not sure if there is too much (any?) code in the wild which inherits from Additionally and indeed, I agonized a bit on where to put the new function - |
Ah, just realized you meant only the |
@talex5 @haesbaert please approve/merge this PR is there are no more objections. |
closing this for now. |
This PR implements setsockopt() function to
Eio.Net.socket
.Fixes #322