Implement close for StreamHandle

This commit is contained in:
Jackson Coxson
2025-08-15 14:55:47 -06:00
parent 50896b1dfe
commit b00be3fa26

View File

@@ -205,6 +205,14 @@ pub struct StreamHandle {
pending_writes: FuturesUnordered<oneshot::Receiver<Result<(), std::io::Error>>>,
}
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.
///