-
Notifications
You must be signed in to change notification settings - Fork 738
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
net/uds: add methods to connect/bind with a socket address #1630
Conversation
I assume this is based on rust-lang/rust#85410, which seems to be on it's way to stable. |
@Thomasdezeeuw yes, kinda. My final goal would be to use abstract UDS in tokio (and higher up). For that I'm really looking forward to I started with this which only tackles the connect/bind side, as it seemed quite safe to do and I noticed that TCP/UDP already had them. |
12d5524
to
d513ca2
Compare
I think you can use socket2 in Tokio, that already support abstract namespaces.
|
The CI here is running I did add a commit on top here to fix the new clippy warnings, but you may consider pinning the linting toolchain too. |
It's really breaking anything, it's just pointing out areas of (possible) improvement.
👍
We only pin the MSRV, not the maximum. |
Just asking explicitly, what are the next steps here? Is this additional API fine here in |
Yes.
Yes. :) Basically, Mio follows the std lib, so I think we should wait until the API at least on the road of stabilisation in std lib. Then we match the api and aren't stuck with a different API due to a last minute name change in std lib, after we already made a release with the function. So, if you want in Tokio today your best bet is to use socket2 directly their. But I don't decide what does and doesn't go in the Tokio api. |
Ack, thanks for the feedback. I'll leave this open here for the moment then, and revisit once stdlib stabilization is done. I'll go check Tokio next, and see if they like a |
9a343a6
to
f251907
Compare
I got busy with many other things in life, but the good news is that in the meanwhile I've rebased and de-conflicted this PR, it should be ready for reviewing and merging, PTAL. |
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.
One question, otherwise LGTM.
This enhances `connect` and `bind` logic for Unix Domain Sockets (UDS), by adding methods which allow to directly use a socket address. This mirrors similar features which already exist in `mio` for TCP and UDP sockets.
f251907
to
933427c
Compare
Thanks @lucab |
This enhances
connect
andbind
logic for Unix Domain Sockets (UDS), by adding methods which allow to directly use a socket address. This mirrors similar features which already exist inmio
for TCP and UDP sockets.