From 9e9bc8a144667a6b7debfd4f0c7a31ff0e11493a Mon Sep 17 00:00:00 2001 From: Can Celik Date: Sun, 6 Sep 2026 02:27:06 +0300 Subject: feat: manage multiple ssh machines from one client (#3670) --- src/client/startup.rs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/client/startup.rs (limited to 'src/client/startup.rs') diff --git a/src/client/startup.rs b/src/client/startup.rs new file mode 100644 index 00000000..40ee2cc8 --- /dev/null +++ b/src/client/startup.rs @@ -0,0 +1,24 @@ +use super::*; + +/// Runs the thin client and enters the main event loop. +pub fn run_client() -> io::Result<()> { + run_client_with_mode(None, None, "connecting to server") +} + +#[cfg(unix)] +pub fn run_terminal_attach(terminal_id: String, takeover: bool) -> io::Result<()> { + run_client_with_mode( + Some((terminal_id, takeover)), + Some(AttachEscapeState::default()), + "attaching to terminal", + ) +} + +#[cfg(windows)] +pub fn run_terminal_attach(_terminal_id: String, _takeover: bool) -> io::Result<()> { + debug_assert!(!crate::platform::capabilities().direct_terminal_attach); + Err(io::Error::new( + io::ErrorKind::Unsupported, + "direct terminal attach is not supported on Windows yet", + )) +} -- cgit v1.2.3