hopr_lib

Function transfer_session

Source
pub async fn transfer_session<S>(
    session: &mut Session,
    stream: &mut S,
    max_buffer: usize,
) -> Result<(usize, usize), Error>
where S: AsyncRead + AsyncWrite + Unpin,
Expand description

Convenience function to copy data in both directions between a Session and arbitrary async IO stream. This function is only available with Tokio and will panic with other runtimes.