From b00be3fa2630429892bdc21faa46fca1399fa586 Mon Sep 17 00:00:00 2001 From: Jackson Coxson Date: Fri, 15 Aug 2025 14:55:47 -0600 Subject: [PATCH] Implement close for StreamHandle --- idevice/src/tcp/handle.rs | 8 ++++++++ 1 file changed, 8 insertions(+) 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. ///