From 0c27d5da17715b414c446bd940a0eb41f6bd0cbe Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Thu, 4 Nov 2021 13:16:13 +0100 Subject: [PATCH] RateLimitedStream: implement peer_addr --- proxmox-http/src/client/rate_limited_stream.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/proxmox-http/src/client/rate_limited_stream.rs b/proxmox-http/src/client/rate_limited_stream.rs index ea993832..865a4261 100644 --- a/proxmox-http/src/client/rate_limited_stream.rs +++ b/proxmox-http/src/client/rate_limited_stream.rs @@ -24,6 +24,12 @@ pub struct RateLimitedStream { stream: S, } +impl RateLimitedStream { + pub fn peer_addr(&self) -> std::io::Result { + self.stream.peer_addr() + } +} + impl RateLimitedStream { /// Creates a new instance with reads and writes limited to the same `rate`.