Windows UDS - #1955
Conversation
| } | ||
| Err(ref err) if err.kind() == io::ErrorKind::WouldBlock => continue, | ||
| Err(ref err) if err.kind() == io::ErrorKind::WouldBlock => { | ||
| thread::sleep(Duration::from_millis(1)); |
There was a problem hiding this comment.
Don't mean to keep it like this (and accept_blocking) -- where we switched off std:: types since they aren't stabilized for Windows yet. Mostly inclined to rewrite this function, but still thinking
|
Mio follows the same (as best we can) API as std lib, since it's still unstable: rust-lang/rust#150487, I think we should wait until it's stable so we can match the API. |
|
Also for cross-referencing some previous prs: |
| pub use self::stream::UnixStream; | ||
|
|
||
| // This is a stand-in until std::os::windows::net::SocketAddr is stabilized. | ||
| #[cfg(windows)] |
There was a problem hiding this comment.
Since this is meant to be temporary, probably shouldn't be mio::net::uds::SocketAddr. Would want to decide on a suitable path that conveys temporariness.
Fair of course, and I'll not fight the guidance of maintainers! My 2c:
And a couple more thoughts on
Edit: |
We decided on following the std lib API because we had to draw the line somewhere on what to support and what not, it's not related to the std lib APIs we use or not. Also see the socket2 library for way more socket option that are not limited to Mio's implementation (but work with it).
Maybe, but I prefer to wait. Furthermore, in my opinion, since the Unix and Windows implementations are now effectively the same I don't think they should live under
Since |
|
Yeah I can see both sides to I wonder if we can point to this PR (which demoes the likely eventual mio [and Tokio] API surface) to see if they'll reconsider the In any case, I'll leave the PR up a week for more feedback in case others have an opinion and close it if nothing changes. And update the issue! I probably won't be the one to push for quicker mio and Tokio chances since I have a working solution on my end 🙂. |
I think the
👍 |
|
A bit late, but will close the PR as mentioned! |
Adds Windows UDS (AF_UNIX SOCK_STREAM) support.
#1609
Windows doesn't support...
SOCK_DGRAM,SOCK_SEQPACKETsocketpairKept platform-specific code to a minimum (aside from
mio::sys::windows::uds), and the tests are also largely intact. Of course, since there's a feature gap in Windows, some minor platform-specific changes have snuck in.