Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::unix::ServeUnixSocketOptions Struct Reference

#include <unix-socket-server.hh>

Public Attributes

std::filesystem::path socketPath
mode_t socketMode = 0666
std::string activationName = ""
Descriptor auxiliaryFd = INVALID_DESCRIPTOR
std::function< void()> onAuxiliaryFdPollin = nullptr

Detailed Description

Options for the serve loop.

Only used if no systemd socket activation is detected.

Member Data Documentation

◆ activationName

std::string nix::unix::ServeUnixSocketOptions::activationName = ""

Name of the socket for socket activation, as included in LISTEN_FDNAMES Ordinarily the name of the socket unit, e.g. nix-daemon.socket If this field is empty, no name filtering will be performed.

◆ auxiliaryFd

Descriptor nix::unix::ServeUnixSocketOptions::auxiliaryFd = INVALID_DESCRIPTOR

Additional file descriptor to poll. Useful for doing a self-pipe trick https://cr.yp.to/docs/selfpipe.html.

◆ onAuxiliaryFdPollin

std::function<void()> nix::unix::ServeUnixSocketOptions::onAuxiliaryFdPollin = nullptr

Optional callback invoked on POLLIN event for auxiliaryFd.

◆ socketMode

mode_t nix::unix::ServeUnixSocketOptions::socketMode = 0666

Mode for the created socket file.

◆ socketPath

std::filesystem::path nix::unix::ServeUnixSocketOptions::socketPath

The Unix domain socket path to create and listen on.


The documentation for this struct was generated from the following file: