Shutdown command

This commit is contained in:
2025-12-21 15:09:44 +01:00
parent c45f9a59ca
commit 8aa3fe17c1
7 changed files with 66 additions and 9 deletions
+5
View File
@@ -346,6 +346,11 @@ impl Client {
pub fn set_uuid(&mut self, uuid: &str) {
self.1 = Some(uuid.to_string())
}
pub fn close(&self) -> crate::Result<()> {
self.0.shutdown(std::net::Shutdown::Both)?;
Ok(())
}
}
impl Clone for Client {