Skip to main content

forward_host_cmd

Function forward_host_cmd 

Source
pub(crate) fn forward_host_cmd(
    data_dir: &Path,
    dir_hash: &str,
    cmd: &str,
) -> Result<(), ForwardError>
Expand description

Forward an arbitrary host IPC command over the same authenticated localhost channel forward_open_new_window uses.

Extracted (issue #2977 Workstream 1) so the tray can also send quit_app without a second copy of the port-file read, bearer-token handshake, and the read-the-response subtlety documented below — all of which are easy to get subtly wrong and none of which are specific to opening a window. forward_open_new_window is now a thin wrapper, so the long-standing second-instance path keeps its exact behavior.