Skip to content

Commit

Permalink
feat(server): add into_inner to AddrStream (#1762)
Browse files Browse the repository at this point in the history
It consumes the `AddrStream` and returns the underlying TcpStream.
  • Loading branch information
luben authored and seanmonstar committed Feb 11, 2019
1 parent 8393dc9 commit e52f80d
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 e52f80d

Please sign in to comment.