aboutsummaryrefslogtreecommitdiff
path: root/src/client/startup.rs
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-09-06 02:27:06 +0300
committerGitHub <noreply@github.com>2026-09-06 02:27:06 +0300
commit9e9bc8a144667a6b7debfd4f0c7a31ff0e11493a (patch)
tree03f1259f91fd9edeacfd4b904f2e84d4acf25232 /src/client/startup.rs
parent35b0dff96579f099e0436290085024424ffb289c (diff)
feat: manage multiple ssh machines from one client (#3670)
Diffstat (limited to 'src/client/startup.rs')
-rw-r--r--src/client/startup.rs24
1 files changed, 24 insertions, 0 deletions
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",
+ ))
+}