diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2022-01-30 20:19:02 +0100 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2022-02-01 19:58:14 +0100 |
| commit | f5d9fe6211bd397deb0ac19b634f551edfa0f6b8 (patch) | |
| tree | 3568c011bdd4dcd201db8ca6ee098da70a1fd53f /src/ProcessLinux.hpp | |
Initialize project
Diffstat (limited to 'src/ProcessLinux.hpp')
| -rw-r--r-- | src/ProcessLinux.hpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/ProcessLinux.hpp b/src/ProcessLinux.hpp new file mode 100644 index 0000000..533054e --- /dev/null +++ b/src/ProcessLinux.hpp @@ -0,0 +1,26 @@ +#include "Process.hpp" +#include <chrono> +#include <fcntl.h> +#include <sys/wait.h> +#include <unistd.h> + +namespace uciadapter { + +class ProcessLinux : public Process { + /// @brief Create pipe to engine stdin + int in_fd[2]; + /// @brief Create pipe to the engine stdout + int out_fd[2]; + /// @brief Writing buffer + char buffer[BUFFER_SIZE]; + /// @brief Contains engine pid + pid_t pid; + +public: + ProcessLinux(); + void Kill(); + void Start(std::string); + std::string ReadLine(); + void Write(std::string); +}; +}; // namespace uciadapter
\ No newline at end of file |
