Add close_connection to lib.rs

This commit is contained in:
Sofia 2026-08-04 21:02:20 +03:00
parent bcc44fa10e
commit cce87f8cd4

View File

@ -257,6 +257,10 @@ impl<T: std::fmt::Debug + Clone + Serialize + DeserializeOwned + Send + Sync + '
self.connection_mgr.close(); self.connection_mgr.close();
} }
pub fn close_connection(&mut self, addr: &SocketAddr, reason: CloseReason) {
self.connection_mgr.close_connection(addr, reason);
}
/// List of all current connections /// List of all current connections
pub fn connections(&self) -> Vec<Connection<T>> { pub fn connections(&self) -> Vec<Connection<T>> {
self.connection_mgr.connections() self.connection_mgr.connections()