KNLLUDOIG47X7V7SMRTKBCLZ6SCKEETLNKBNS5ARCYCD2RJLIEQAC
}
async fn start_reading<R: AsyncRead + Unpin>(mut stream_read: R, mut buffer: SSHBuffer, cipher: Arc<crate::cipher::CipherPair>) -> Result<(usize, R, SSHBuffer), anyhow::Error> {
buffer.buffer.clear();
let n = cipher::read(&mut stream_read, &mut buffer, &cipher).await?;
Ok((n, stream_read, buffer))
stream.shutdown().await?;
buffer.buffer.clear();
while cipher::read(&mut stream, &mut buffer, &session.common.cipher).await? != 0 {
buffer.buffer.clear();
stream_write.shutdown().await?;
loop {
let (n, r, b) = (&mut reading).await?;
if n == 0 {
break
} else {
reading.set(start_reading(r, b, session.common.cipher.clone()))
}
async fn start_reading<R: AsyncRead + Unpin>(mut stream_read: R, mut buffer: SSHBuffer, cipher: Arc<crate::cipher::CipherPair>) -> Result<(usize, R, SSHBuffer), anyhow::Error> {
buffer.buffer.clear();
let n = cipher::read(&mut stream_read, &mut buffer, &cipher).await?;
Ok((n, stream_read, buffer))
}