feat(server): add remote_addr method to AddrStream

This commit is contained in:
Sean McArthur
2018-08-07 16:46:46 -07:00
parent 4020a2f8b9
commit 26f3a5ed31

View File

@@ -199,6 +199,12 @@ mod addr_stream {
remote_addr: addr, remote_addr: addr,
} }
} }
/// Returns the remote (peer) address of this connection.
#[inline]
pub fn remote_addr(&self) -> SocketAddr {
self.remote_addr
}
} }
impl Read for AddrStream { impl Read for AddrStream {