diff --git a/src/tools/async_io.rs b/src/tools/async_io.rs index 963f6fdd..83110912 100644 --- a/src/tools/async_io.rs +++ b/src/tools/async_io.rs @@ -60,6 +60,32 @@ impl AsyncWrite for MaybeTlsStream { } } + fn poll_write_vectored( + self: Pin<&mut Self>, + cx: &mut Context<'_>, + bufs: &[io::IoSlice<'_>], + ) -> Poll> { + match self.get_mut() { + MaybeTlsStream::Normal(ref mut s) => { + Pin::new(s).poll_write_vectored(cx, bufs) + } + MaybeTlsStream::Proxied(ref mut s) => { + Pin::new(s).poll_write_vectored(cx, bufs) + } + MaybeTlsStream::Secured(ref mut s) => { + Pin::new(s).poll_write_vectored(cx, bufs) + } + } + } + + fn is_write_vectored(&self) -> bool { + match self { + MaybeTlsStream::Normal(s) => s.is_write_vectored(), + MaybeTlsStream::Proxied(s) => s.is_write_vectored(), + MaybeTlsStream::Secured(s) => s.is_write_vectored(), + } + } + fn poll_flush(self: Pin<&mut Self>, cx: &mut Context) -> Poll> { match self.get_mut() { MaybeTlsStream::Normal(ref mut s) => {