more things

This commit is contained in:
nora 2024-08-23 16:31:27 +02:00
parent a092cfd494
commit 9532065b16
4 changed files with 240 additions and 44 deletions

View file

@ -154,6 +154,13 @@ impl ClientConnection {
}
}
pub fn channels(&mut self) -> Option<&mut ssh_connection::ChannelsState> {
match &mut self.state {
ClientConnectionState::Open(channels) => Some(channels),
_ => None,
}
}
pub fn is_open(&self) -> bool {
matches!(self.state, ClientConnectionState::Open(_))
}