Skip to main content

relay_bidirectional

Function relay_bidirectional 

Source
pub async fn relay_bidirectional(
    stream_a: TcpStream,
    stream_b: TcpStream,
) -> Result<(), ProtocolError>
Expand description

Relay data bidirectionally between two TCP streams.

Takes ownership of both streams and relays until either side closes.