Skip to content

Commit 26f3a5e

Browse files
committed
feat(server): add remote_addr method to AddrStream
1 parent 4020a2f commit 26f3a5e

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
@@ -199,6 +199,12 @@ mod addr_stream {
199199
remote_addr: addr,
200200
}
201201
}
202+
203+
/// Returns the remote (peer) address of this connection.
204+
#[inline]
205+
pub fn remote_addr(&self) -> SocketAddr {
206+
self.remote_addr
207+
}
202208
}
203209

204210
impl Read for AddrStream {

0 commit comments

Comments
 (0)