I've a code:
let mut inbound_bytes = BytesCodec::new().framed(inbound); let mut outbound_bytes = BytesCodec::new().framed(outbound); let (mut ri, mut wi) = inbound_bytes.split(); let (mut ro, mut wo) = outbound_bytes.split();
How can I read from ri and write to wi and so on? QQ
Reading is done through the Stream trait and writing is done with the Sink trait. Note that the futures crate provides a StreamExt and SinkExt with utilities for working with these types.
Stream
Sink
StreamExt
SinkExt
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.