diff --git a/CHANGES.md b/CHANGES.md index 836b16b3c..22b422667 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -15,6 +15,10 @@ * Content compression/decompression (br, gzip, deflate) +* Server multi-threading + +* Gracefull shutdown support + ## 0.2.1 (2017-11-03) diff --git a/src/channel.rs b/src/channel.rs index baae32fa0..ef8afbd16 100644 --- a/src/channel.rs +++ b/src/channel.rs @@ -248,6 +248,7 @@ impl Node<()> { } +/// Low-level io stream operations pub trait IoStream: AsyncRead + AsyncWrite + 'static { fn shutdown(&mut self, how: Shutdown) -> io::Result<()>; @@ -274,6 +275,7 @@ impl IoStream for TcpStream { } +/// Wrapper for `AsyncRead + AsyncWrite` types pub(crate) struct WrapperStream where T: AsyncRead + AsyncWrite + 'static { io: T, } diff --git a/src/h1.rs b/src/h1.rs index e5f592dd2..c0a1c68db 100644 --- a/src/h1.rs +++ b/src/h1.rs @@ -942,13 +942,13 @@ mod tests { } impl IoStream for Buffer { - fn shutdown(&self, _: Shutdown) -> io::Result<()> { + fn shutdown(&mut self, _: Shutdown) -> io::Result<()> { Ok(()) } - fn set_nodelay(&self, _: bool) -> io::Result<()> { + fn set_nodelay(&mut self, _: bool) -> io::Result<()> { Ok(()) } - fn set_linger(&self, _: Option) -> io::Result<()> { + fn set_linger(&mut self, _: Option) -> io::Result<()> { Ok(()) } }