mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 16:26:18 +02:00
ac89bb064a
All OS and IO operations should be moved out, leaving only some misc portable pure functions. This is useful to avoid copious CPP when doing things like Windows and Emscripten ports. Newly exposed functions to break cycles: - `restoreSignals` - `updateWindowSize`
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);
|
|
|
|
}
|