async-tls
async-tls copied to clipboard
Make TlsStream cloneable
async_std::net::TcpStream
implements Clone
, 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
for TlsStream
, neither does it implement AsyncRead
or AsyncWrite
for &TlsStream
.
How would I rewrite the example above to use TLS when TlsStream
is not clonable?
@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 https://github.com/http-rs/async-h1/issues/74