Skip to content

Commit

Permalink
Add into_inner to AddrStream
Browse files Browse the repository at this point in the history
It consumes the `AddrStream` and returns the underlying TcpStream.
  • Loading branch information
luben committed Feb 11, 2019
1 parent 8393dc9 commit 35e0715
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/server/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,12 @@ mod addr_stream {
pub fn remote_addr(&self) -> SocketAddr {
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 {
Expand Down

0 comments on commit 35e0715

Please sign in to comment.