-
Notifications
You must be signed in to change notification settings - Fork 47
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
Make TlsStream cloneable #18
Comments
@yoshuawuyts Correct me if I'm wrong but one of the changes suggested by @NyxCode above would need to be implemented to apply either of the solutions suggested in http-rs/async-h1#74 |
I'm making a simple proxy server. So being able to read/write a If people are still interested in this, there's a unsafe work-around:
Tests worked for me. My code is not in production yet. But this is the only hack for me. I hope this helps someone else. In long term, I hope crate authors could provide some --- Edited --- I'm sorry it didn't work. |
async_std::net::TcpStream
implementsClone
, which makes it possible to read and write to a socket at the same time.Official async-std example
This library does not implement
Clone
forTlsStream
, neither does it implementAsyncRead
orAsyncWrite
for&TlsStream
.How would I rewrite the example above to use TLS when
TlsStream
is not clonable?The text was updated successfully, but these errors were encountered: