-
Notifications
You must be signed in to change notification settings - Fork 340
Implement Clone for TcpStream #553
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
Comments
After all need a source clone, right?
|
Seems like this was accidentally closed (: |
@yoshuawuyts, it looks like @stjepang is saying that If that's the case, I started having a look at what it would take to do that. I changed the #[derive(Debug)]
pub struct TcpStream {
pub(super) watcher: Watcher<Arc<mio::net::TcpStream>>,
} And updated all the references to the inner value of
So I just commented it out and proceeded with the
Is this a good approach though? I'm not exactly sure on the internals of async_std, but it looks like it I call On the other hand, is
I'm happy to open a pull request if any of these seem like reasonable ideas. |
It just dawned on me. Could you presumably clone a |
@atbentley it seems @gsquire |
I have a use case where having |
Is this issue still unresolved? I'm asking because it already works for me:
|
You're right, this issue is resolved :) |
Good! @yoshuawuyts please close this issue. |
As per #365 (comment) we should implement
Clone
forTcpStream
. The inner fd is already wrapped in anArc
, so cloning it should be straightforward. Thanks!The text was updated successfully, but these errors were encountered: