-
Notifications
You must be signed in to change notification settings - Fork 743
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
Use std::os::unix::net::SocketAddr instead of mio::net::SocketAddr #1527
Comments
…r=m-ou-se Add os::unix::net::SocketAddr::from_path Creates a new SocketAddr from a path, supports both regular paths and abstract namespaces. Note that `SocketAddr::from_abstract_namespace` could be removed after this as `SocketAddr::unix` also supports abstract namespaces. Updates rust-lang#65275 Unblocks tokio-rs/mio#1527 r? `@m-ou-se`
We can do this in 1.61. |
@Thomasdezeeuw is it confirmed to be stabilizing then? |
@Noah-Kennedy it's stabilised in rust-lang/rust#94356. |
From #1605, I want to notice you that there may be a regression in the replacement: As you can see here, Of course, there's no reason for But mio has already supported abstract Unix socket, though it's a little buggy, like there's no conditional compilation to make it only work on Linux. So this replacement will possibly break the use of abstract Unix socket, I think we need to be careful on this. (Sorry for my bad English) |
I think the support is still unstable, but it's should come at some point: https://doc.rust-lang.org/std/os/unix/net/struct.SocketAddr.html#method.from_abstract_namespace. Maybe we can create a pr to stabilise it. |
That's a good idea indeed.
…On Tue, 30 Aug 2022 at 20:09, Thomas de Zeeuw ***@***.***> wrote:
I think the support is still unstable, but it's should come at some point:
https://doc.rust-lang.org/std/os/unix/net/struct.SocketAddr.html#method.from_abstract_namespace.
Maybe we can create a pr to stabilise it.
—
Reply to this email directly, view it on GitHub
<#1527 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABCY4MXA6BK2ZDAP4M3UPTV3ZE6VANCNFSM5HQUHSUQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Replaces mio::net::SocketAddr with std::os::unix::net::SocketAddr. With this change the path based API to create the sockets ({UnixDatagram,UnixListener}::bind and UnixStream::connect) will no longer work with abstract namespaces. For that the _addr variant must be used and the address created by using SocketAddr::from_abstract_name (part of the std::os::linux::net::SocketAddrExt trait). Adds UnixDatagram::bind_addr to match UnixStream::connect_addr and UnixListener::bind_addr. Expands the unix_listener_abstract_namespace test to run on Android and actually create a listener and use it. Closes #1527
Replaces mio::net::SocketAddr with std::os::unix::net::SocketAddr. With this change the path based API to create the sockets ({UnixDatagram,UnixListener}::bind and UnixStream::connect) will no longer work with abstract namespaces. For that the _addr variant must be used and the address created by using SocketAddr::from_abstract_name (part of the std::os::linux::net::SocketAddrExt trait). Adds UnixDatagram::bind_addr to match UnixStream::connect_addr and UnixListener::bind_addr. Expands the unix_listener_abstract_namespace test to actually create a listener and use it. Closes #1527
Replaces mio::net::SocketAddr with std::os::unix::net::SocketAddr. With this change the path based API to create the sockets ({UnixDatagram,UnixListener}::bind and UnixStream::connect) will no longer work with abstract namespaces. For that the _addr variant must be used and the address created by using SocketAddr::from_abstract_name (part of the std::os::linux::net::SocketAddrExt trait). Adds UnixDatagram::bind_addr to match UnixStream::connect_addr and UnixListener::bind_addr. Expands the unix_listener_abstract_namespace test to actually create a listener and use it. Closes #1527
Replaces mio::net::SocketAddr with std::os::unix::net::SocketAddr. With this change the path based API to create the sockets ({UnixDatagram,UnixListener}::bind and UnixStream::connect) will no longer work with abstract namespaces. For that the _addr variant must be used and the address created by using SocketAddr::from_abstract_name (part of the std::os::linux::net::SocketAddrExt trait). Adds UnixDatagram::bind_addr to match UnixStream::connect_addr and UnixListener::bind_addr. Expands the unix_listener_abstract_namespace test to actually create a listener and use it. Closes #1527
Replaces mio::net::SocketAddr with std::os::unix::net::SocketAddr. With this change the path based API to create the sockets ({UnixDatagram,UnixListener}::bind and UnixStream::connect) will no longer work with abstract namespaces. For that the _addr variant must be used and the address created by using SocketAddr::from_abstract_name (part of the std::os::linux::net::SocketAddrExt trait). Adds UnixDatagram::bind_addr to match UnixStream::connect_addr and UnixListener::bind_addr. Expands the unix_listener_abstract_namespace test to actually create a listener and use it. Closes #1527
It's the same type. It's only implemented by us because we can't create
std::os::unix::net::SocketAddr
.The text was updated successfully, but these errors were encountered: