diff --git a/idevice/src/tcp/handle.rs b/idevice/src/tcp/handle.rs index 43e6612..9ee240a 100644 --- a/idevice/src/tcp/handle.rs +++ b/idevice/src/tcp/handle.rs @@ -205,6 +205,14 @@ pub struct StreamHandle { pending_writes: FuturesUnordered>>, } +impl StreamHandle { + pub fn close(&mut self) { + let _ = self.send_channel.send(HandleMessage::Close { + host_port: self.host_port, + }); + } +} + impl AsyncRead for StreamHandle { /// Attempts to read from the connection into the provided buffer. ///