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}

On Windows the returned string is a full named pipe path that should be passed to interprocess::local_socket::ToNsName::to_ns_name with GenericNamespaced. On Unix it is a filesystem path for interprocess::local_socket::ToFsName::to_fs_name with GenericFilePath.