Module daemon

Module daemon 

Expand description

Daemon imlementation

Modulesยง

workspace ๐Ÿ”’

Structsยง

Client ๐Ÿ”’
Representation of a client
Daemon ๐Ÿ”’
The daemon is responsible to launch a client for each host, positioning the client windows, forwarding input records to all clients and handling control mode.
HWNDWrapper ๐Ÿ”’
Hacky wrapper around a window handle.

Enumsยง

ControlModeState ๐Ÿ”’
Enum of all possible control mode states.

Constantsยง

SENDER_CAPACITY ๐Ÿ”’
The capacity of the broadcast channel used to send the input records read from the console input buffer to the named pipe servers connected to each client in parallel.

Functionsยง

arrange_client_window ๐Ÿ”’
Re-sizes and re-positions the given client window based on the total number of clients, the size of the daemon console window and its index relative to the other client windows.
defer_windows ๐Ÿ”’
Move all given windows to the foreground.
determine_client_spatial_attributes ๐Ÿ”’
Calculates the position and dimensions for a client window given its index, the total number of clients and the aspect_ratio_adjustment daemon configuration.
ensure_client_z_order_in_sync_with_daemon ๐Ÿ”’
Spawns a background thread that ensures the z-order of all client windows is in sync with the daemon window. I.e. if the daemon window is focussed, all clients should be moved to the foreground.
get_console_rect ๐Ÿ”’
Transform the position and dimensions of a console window based on the workspace area.
get_console_window_wrapper ๐Ÿ”’
Returns a window handle to the current console window.
get_foreground_window_wrapper ๐Ÿ”’
Returns a window handle to the foreground window.
launch_client_console ๐Ÿ”’
Launchs a client console process with its own window with the given CLI arguments/options: host, username, port, debug.
launch_clients ๐Ÿ”’
Launches a client console for each given host and waits for the client windows to exist before returning their handles.
main
The entrypoint for the daemon subcommand.
named_pipe_server_routine ๐Ÿ”’
Wait for the named pipe server to connect, then forward serialized input records read from the broadcast channel to the named pipe server.
resolve_cluster_tags
Resolve cluster tags into hostnames
toggle_processed_input_mode ๐Ÿ”’
The processed console input mode controls whether special key combinations such as Ctrl + c or Ctrl + BREAK receive special handling or are treated as simple key presses.