pub async fn tcp_tunnel<D, U>( stream: D, upstream: U, ) -> Result<(u64, u64), Error>where U: AsyncRead + AsyncWrite + Unpin + Send + 'static, D: AsyncRead + AsyncWrite + Unpin + Send + 'static,
Creates a tunnel between the given [Stream] and [TcpStream].
Stream
TcpStream
On success, the total number of bytes sent and received is returned.