Is there a way to rejoin a Tokio ReadHalf and WriteHalf into a TcpStream after a split?
let mut stream = TcpStream::connect("127.0.0.1:8080").await?;
let (reader, writer) = stream.split();
// re-join pseudo-code
let stream: TcpStream = (reader, writer).join();
From cargo doc
To restore this read/write object from its split::ReadHalf and split::WriteHalf use unsplit.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With