-
Notifications
You must be signed in to change notification settings - Fork 249
Socket2 use for Mio #56
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
Comments
An example of restructuring the API: #57. |
Hey everyone, another user relying on this crate chiming in - currently developing and wrapping up an alternative to mio (similar capabilities, but much simpler and 100% safe), which would not be possible without socket2, so here's another thank you! I would also be interested in helping maintain this crate :) |
Hello and thanks for reaching out! I do indeed not necessarily have a ton of time (or interest at this point) to maintain this crate. I'm happy to help keep it alive though, and would love to have help if others are interested! @sfackler has also helped out with this crate historically (I think? If not feel free to unsubscribe). I don't mind modernizing this and/or reorganizing it. I would like to keep the spirit of the crate though where it's an extremely thin wrapper around the OS without extra abstraction and such. Given what I've seen so far though it looks like that won't be an issue :) Perhaps @Thomasdezeeuw and @stjepang y'all could help out with some PRs/reviews of those PRs and if everything looks good I can add y'all as maintainers? |
@alexcrichton sound good, I'll start sending prs and ping @stjepang for reviews (if you're OK with that @stjepang). |
Sounds great to me, let's do that! |
Continuing in #212. |
Hello I'm the maintainer of Mio and I want to support some additional API around sockets. To not duplicate the effort around raw socket handling I think socket2 would be a good fit.
However I do have some questions. What is the status of maintenance of this crate? I've read @alexcrichton message some time ago that he'll be taking a step back from Rust (sorry to see you go and thanks for all you've done!). I'm willing to help maintain this crate if its a good fit for Mio.
I'm also looking to change the API a bit. I've being doing some experiments here: https://github.com/Thomasdezeeuw/socket2, diff: master...Thomasdezeeuw:master. The basic idea follows the same philosophy as Mio with OS specific API: make setters only available on OSes that support it and getters on all platforms (returning a negative/false value if not supported). For example
mio::Interest::LIO
is only available on FreeBSD, but its getter is available on all platforms.Furthermore I would like to structure the code a bit differently. Moving the struct definitions to the same file as the commonly supported API, but move OS specific additional API to the
sys/
dir. For example the common API forDomain
: https://github.com/Thomasdezeeuw/socket2/blob/279c289e0af232167c7b67560b6c64e60ef0069c/src/lib.rs#L63-L112. And the Unix specific API is located insys/unix.rs
: https://github.com/Thomasdezeeuw/socket2/blob/279c289e0af232167c7b67560b6c64e60ef0069c/src/sys/unix.rs#L32-L44.Let me know what you guys think.
The text was updated successfully, but these errors were encountered: