Skip to main content

socket_path

Function socket_path 

Source
pub fn socket_path(scope_hash: Option<&str>) -> String
Expand description

Returns the local socket name the daemon listens on.

  • Linux/macOS: $XDG_RUNTIME_DIR/running-process/daemon{-hash}.sock (fallback: /tmp/running-process-{uid}/daemon{-hash}.sock)
  • Windows: \\.\pipe\running-process-daemon-{username}{-hash}

The returned display path must be passed through crate::broker::server::singleton_bind::wrap_socket_name before use. That shared boundary prevents Windows pipe paths from acquiring the namespace prefix more than once.