Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Windows: Add support for Unix sockets #249

Merged
merged 1 commit into from
Aug 18, 2022

Conversation

jstarks
Copy link
Contributor

@jstarks jstarks commented Jul 22, 2021

Newer versions of Windows support AF_UNIX stream sockets. This change
adds Windows support for the SockAddr::unix function and the
Domain::UNIX constant.

Since Unix sockets are now available on all tier1 platforms, this also
removes all feature requirement from the SockAddr::unix function.

src/sys/windows.rs Outdated Show resolved Hide resolved
src/sys/windows.rs Outdated Show resolved Hide resolved
src/sys/windows.rs Outdated Show resolved Hide resolved
src/sys/windows.rs Outdated Show resolved Hide resolved
src/sys/windows.rs Outdated Show resolved Hide resolved
@jstarks jstarks force-pushed the windows_unix branch 2 times, most recently from 0cdedf6 to 5db7219 Compare August 16, 2022 18:37
@jstarks
Copy link
Contributor Author

jstarks commented Aug 16, 2022

I've finally addressed your comments and have rebased for 0.5. @Thomasdezeeuw, let me know if you'd like to see anything else.

@notgull
Copy link
Contributor

notgull commented Aug 16, 2022

Just to clarify: if this is called on a Windows platform that doesn't support UDS, it just returns an error, right?

@jstarks
Copy link
Contributor Author

jstarks commented Aug 16, 2022

Right, it will fail with WSAEAFNOSUPPORT.

src/sockaddr.rs Outdated Show resolved Hide resolved
src/sys/windows.rs Outdated Show resolved Hide resolved
src/sys/windows.rs Outdated Show resolved Hide resolved
src/sys/windows.rs Outdated Show resolved Hide resolved
Newer versions of Windows support AF_UNIX stream sockets. This change
adds Windows support for the `SockAddr::unix` function and the
`Domain::UNIX` constant.

Since Unix sockets are now available on all tier1 platforms, this also
removes `all` feature requirement from the `SockAddr::unix` function.
@Thomasdezeeuw Thomasdezeeuw merged commit 5d61324 into rust-lang:master Aug 18, 2022
@Thomasdezeeuw
Copy link
Collaborator

Thanks @jstarks.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants