From f1af8679481cfc4199b6423d723f67188145ea46 Mon Sep 17 00:00:00 2001 From: Christian Krinitsin Date: Fri, 21 Mar 2025 16:17:20 +0100 Subject: client: add client class with input processing --- src/client/client.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/client/client.h (limited to 'src/client/client.h') diff --git a/src/client/client.h b/src/client/client.h new file mode 100644 index 0000000..9ff5b47 --- /dev/null +++ b/src/client/client.h @@ -0,0 +1,32 @@ +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "shared_memory.h" +class Client { +public: + Client(); + ~Client(); + + void start_client(); + +private: + SharedMemory* shared_memory; + int shm_fd; + + int send_request( + SharedMemory* shared_memory, + Operations type, + std::optional k, + std::optional v); + bool request_processed(SharedMemory* shared_memory, int index); + std::string process_result(SharedMemory* shared_memory, int index); +}; -- cgit 1.4.1