pub async fn run_server(
socket_path: &Path,
stats: Arc<RwLock<DaemonStats>>,
shutdown_tx: Option<Sender<()>>,
shutdown_rx: Receiver<()>,
) -> Result<()>Expand description
Runs the IPC server on the given Unix socket path.
The server listens for incoming connections and processes commands until a shutdown signal is received or the Stop command is sent.
§Arguments
socket_path- Path for the Unix domain socketstats- Shared statistics that can be read by clientsshutdown_tx- Sender to signal daemon shutdown when Stop is receivedmut shutdown_rx- Receiver that signals when to stop the server
§Errors
Returns an error if the socket cannot be created or bound.