Skip to main content

Module ipc

Module ipc 

Source
Expand description

Daemon IPC endpoint — one API, two transports.

  • Unix: a Unix domain socket at the endpoint path (the daemon binds it inside the 0700 run dir and chmods it 0600, see daemon::listener::bind).
  • Windows: a named pipe whose name is derived from the endpoint path ([pipe_name]), so daemon.json, crate::daemon::registry::DaemonPaths and every caller keep speaking in paths; nothing is created on disk at the path. The pipe carries what the socket’s file mode carries on Unix:
    • the server instances get an owner-only DACL (this user and SYSTEM) and refuse remote clients — the 0600 analogue; and
    • a client refuses a server process that does not run as this user — the 0700-dir analogue: no other account can squat the name while no daemon is serving it.

Read halves report a peer that went away as EOF on both platforms (named pipes surface it as BrokenPipe), so frame readers keep one EOF path.

Structs§

Listener
The daemon’s accept side.

Functions§

connect
split_client
split_server

Type Aliases§

ClientReadHalf
ClientStream
A client’s connection to the daemon.
ClientWriteHalf
ServerReadHalf
ServerStream
A connection the daemon accepted.
ServerWriteHalf