diff options
Diffstat (limited to 'src/client/startup.rs')
| -rw-r--r-- | src/client/startup.rs | 24 |
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", + )) +} |
