main

Function main 

pub async fn main(
    api: &dyn WindowsApi,
    host: String,
    username: Option<String>,
    cli_port: Option<u16>,
    config: &ClientConfig,
)
Expand description

The entrypoint for the client subcommand with API dependency injection.

Spawns a tokio background thread to ensure the console window title is not replaced by the name of the child process once its launched. Starts the SSH process as child process. Executes the main run loop.

ยงArguments

  • api - The Windows API implementation to use.
  • host - The name of the host to connect to, optionally with :port suffix.
  • username - The username to be used. Will try to resolve the correct username from the ssh config if none is given.
  • cli_port - Optional port from CLI option. Inline port takes precedence.
  • config - A reference to the ClientConfig.