Skip to content

Commit e52f80d

Browse files
lubenseanmonstar
authored andcommitted
feat(server): add into_inner to AddrStream (#1762)
It consumes the `AddrStream` and returns the underlying TcpStream.
1 parent 8393dc9 commit e52f80d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/server/tcp.rs

+6
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,12 @@ mod addr_stream {
219219
pub fn remote_addr(&self) -> SocketAddr {
220220
self.remote_addr
221221
}
222+
223+
/// Consumes the AddrStream and returns the underlying IO object
224+
#[inline]
225+
pub fn into_inner(self) -> TcpStream {
226+
self.inner
227+
}
222228
}
223229

224230
impl Read for AddrStream {

0 commit comments

Comments
 (0)