mirror of
https://github.com/NixOS/nix
synced 2025-06-29 10:31:15 +02:00
This splits files and adds new identifiers in preperation for supporting windows, but no Windows-specific code is actually added yet. Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
31 lines
504 B
C++
31 lines
504 B
C++
#pragma once
|
|
///@file
|
|
|
|
#include "types.hh"
|
|
#include "file-descriptor.hh"
|
|
|
|
#include <unistd.h>
|
|
|
|
namespace nix {
|
|
|
|
/**
|
|
* Create a Unix domain socket.
|
|
*/
|
|
AutoCloseFD createUnixDomainSocket();
|
|
|
|
/**
|
|
* Create a Unix domain socket in listen mode.
|
|
*/
|
|
AutoCloseFD createUnixDomainSocket(const Path & path, mode_t mode);
|
|
|
|
/**
|
|
* Bind a Unix domain socket to a path.
|
|
*/
|
|
void bind(int fd, const std::string & path);
|
|
|
|
/**
|
|
* Connect to a Unix domain socket.
|
|
*/
|
|
void connect(int fd, const std::string & path);
|
|
|
|
}
|