Skip to main content

default_socket

Function default_socket 

Source
pub fn default_socket() -> PathBuf
Expand description

Where the socket daemon listens by default. $ZWIRE_HOST_SOCK overrides on every platform. Otherwise:

  • Windows — a per-user named pipe \\.\pipe\zwire-host-<user>.
  • Unix — a runtime dir, never the persistent state dir: Linux $XDG_RUNTIME_DIR/zwire-host.sock, macOS $TMPDIR/zwire-host.sock (the per-user /var/folders/…/T, mode 0700), else /tmp.

A socket is ephemeral runtime state, so it deliberately does not live under the app-data/state dir the scheme + kv files use.

On Windows the returned path’s leaf is used as the pipe’s namespaced name; the directory portion is ignored.