Skip to main content

run_daemon

Function run_daemon 

Source
pub async fn run_daemon(
    binding: ProjectBinding,
    http_port: Option<u16>,
) -> Result<()>
Expand description

Run the persistent tcode daemon: bind the socket, optionally bind HTTP, and serve both until SIGTERM/SIGINT.

Why/What: see module docs. http_port is Some for as long as trusty-code-gui’s webview still dials the TCP listener; PR 2 makes it None and deletes the parameter.

§Errors

The socket could not be bound or hardened (fatal — there is deliberately no HTTP-only degrade), the router could not be assembled, or the HTTP listener failed.

Test: uds_tests::run_uds_socket_bind_failure_is_fatal, uds_tests::session_events_stream_stays_open_under_idle_window.