add async .read_ready() method
@@ -417,6 +417,12 @@ impl<F> Io<F> {
poll_fn(|cx| self.poll_recv(codec, cx)).await
}
+ #[inline]
+ /// Wake read task and instruct to read more data
+ pub async fn read_ready(&self) -> Option<io::Result<()>> {
+ poll_fn(|cx| self.poll_read_ready(cx)).await
+ }
+
#[inline]
/// Pause read task
pub fn pause(&self) {
