use tokio::io::AsyncReadExt;
use tokio::net::tcp::OwnedReadHalf;
pub struct ProxyReader {
pub read_stream: OwnedReadHalf,
}
impl ProxyReader {
pub async fn read(&mut self, buffer: impl Into<&mut [u8]>) -> std::io::Result<usize> {
self.read_stream.read_exact(buffer.into()).await
}
}