-
Notifications
You must be signed in to change notification settings - Fork 340
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
Transform TcpListener into Stream of connections #981
Comments
A solution should ideally first be found for the problem in stdlib since async-std tries to mirror the stdlib in async ways. |
WIP: rust-lang/rust#88373 |
The feature got merged, so it could already be implemented behind an unstable flag. |
Adding this behind an unstable flag makes sense to me! Would you be willing to a file a PR for that? |
Ugh, apparently since all methods are delegated to |
There is
TcpListener::incoming
that provides this functionality, but it has a lifetime. I cannot simply pass the stream around and manipulate it, because it has'a
lifetime bound to theTcpListener
. An alternative that takes over ownership would be appreciated.Note that this is symmetric to the stdlib, where the same API suffers from the same problem.
The text was updated successfully, but these errors were encountered: