multiprocess: Add IPC connectAddress and listenAddress methods

Allow listening on and connecting to unix sockets.
This commit is contained in:
Russell Yanofsky
2018-08-23 13:42:31 -04:00
parent 4da20434d4
commit 955d4077aa
6 changed files with 181 additions and 1 deletions

View File

@@ -34,6 +34,16 @@ public:
//! process. If so, return true and a file descriptor for communicating
//! with the parent process.
virtual bool checkSpawned(int argc, char* argv[], int& fd) = 0;
//! Canonicalize and connect to address, returning socket descriptor.
virtual int connect(const fs::path& data_dir,
const std::string& dest_exe_name,
std::string& address) = 0;
//! Create listening socket, bind and canonicalize address, and return socket descriptor.
virtual int bind(const fs::path& data_dir,
const std::string& exe_name,
std::string& address) = 0;
};
//! Constructor for Process interface. Implementation will vary depending on