Skip to main content

run_control_channel

Function run_control_channel 

async fn run_control_channel(
    api: &dyn WindowsApi,
    client: WindowsControlChannelClient,
    master: Arc<Mutex<Box<dyn Write + Send>>>,
    child_pid: u32,
    state_sender: &Sender<ClientState>,
    highlight_sender: &Sender<bool>,
    max_frame_len: u32,
    pending: Vec<u8>,
    child_exit: Receiver<i32>,
)
Expand description

Dispatch daemon messages until the daemon terminates or disconnects, or the SSH child exits.

§Arguments

  • api - The Windows API implementation to use.
  • client - The connected control-channel client.
  • master - Shared PTY master writer.
  • child_pid - Process id of the SSH child.
  • state_sender - Watch sender for the client state.
  • highlight_sender - Watch sender for the highlight flag.
  • max_frame_len - The negotiated maximum frame length.
  • pending - Bytes received during the handshake but not consumed.
  • child_exit - Receives the SSH child’s exit code.