Function forward_connection

Source
async fn forward_connection<R, FUT, TS>(
    runtime: R,
    request: StreamRequest,
    target_stream_future: FUT,
    nickname: &HsNickname,
    addr: &TargetAddr,
) -> Result<(), RequestFailed>
where R: Runtime, FUT: Future<Output = Result<TS, Error>>, TS: AsyncRead + AsyncWrite + Send + 'static,
Expand description

Try to open a connection to an appropriate local target using target_stream_future. If successful, try to report success on request and transmit data between the two stream indefinitely. On failure, close request.

Only return an error if we were unable to behave as intended due to a problem we did not already report.