Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
unix-domain-socket.hh File Reference
#include "types.hh"
#include "file-descriptor.hh"
#include <unistd.h>

Go to the source code of this file.

Typedefs

using nix::Socket
 

Functions

AutoCloseFD nix::createUnixDomainSocket ()
 
AutoCloseFD nix::createUnixDomainSocket (const Path &path, mode_t mode)
 
void nix::bind (Socket fd, const std::string &path)
 
void nix::connect (Socket fd, const std::string &path)
 

Typedef Documentation

◆ Socket

using nix::Socket
Initial value:
int

Often we want to use Descriptor, but Windows makes a slightly stronger file descriptor vs socket distinction, at least at the level of C types.

Function Documentation

◆ bind()

void nix::bind ( Socket fd,
const std::string & path )

Bind a Unix domain socket to a path.

◆ connect()

void nix::connect ( Socket fd,
const std::string & path )

Connect to a Unix domain socket.

◆ createUnixDomainSocket() [1/2]

AutoCloseFD nix::createUnixDomainSocket ( )

Create a Unix domain socket.

◆ createUnixDomainSocket() [2/2]

AutoCloseFD nix::createUnixDomainSocket ( const Path & path,
mode_t mode )

Create a Unix domain socket in listen mode.