feat(server): add into_inner to AddrStream (#1762)

It consumes the `AddrStream` and returns the underlying TcpStream.
This commit is contained in:
luben karavelov
2019-02-11 18:45:55 +00:00
committed by Sean McArthur
parent 8393dc9f18
commit e52f80df5a

View File

@@ -219,6 +219,12 @@ mod addr_stream {
pub fn remote_addr(&self) -> SocketAddr { pub fn remote_addr(&self) -> SocketAddr {
self.remote_addr self.remote_addr
} }
/// Consumes the AddrStream and returns the underlying IO object
#[inline]
pub fn into_inner(self) -> TcpStream {
self.inner
}
} }
impl Read for AddrStream { impl Read for AddrStream {