Skip to content
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

Feature request: Add FromRawFd to UnixStream #212

Closed
laptou opened this issue Nov 28, 2020 · 1 comment
Closed

Feature request: Add FromRawFd to UnixStream #212

laptou opened this issue Nov 28, 2020 · 1 comment

Comments

@laptou
Copy link

laptou commented Nov 28, 2020

I would like to be able to convert raw file descriptors into UnixStream without having to convert to Async<std::os::unix::net::UnixStream> first.

@notgull
Copy link
Member

notgull commented Aug 21, 2022

I don't believe that there's a way to implement FromRawFd on UnixStream without introducing a potential panic. Given that smol-rs/async-net#21 introduces a way to convert an OwnedFd to a UnixStream using TryFrom, and how one can unsafely convert a RawFd to an OwnedFd, this issue should be resolved.

@notgull notgull closed this as completed Aug 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants