move marshaller out of template

This commit is contained in:
Сергей Маринкевич
2025-12-02 19:49:04 +07:00
parent 785fca07f1
commit 9f48a74677
3 changed files with 11 additions and 10 deletions
+4 -2
View File
@@ -1,5 +1,6 @@
#include "MyService.proxy.h"
#include "ipc/IpcPipeChannel.h"
#include "proxy/ProxyMarshaller.h"
#include <sys/stat.h>
@@ -15,8 +16,9 @@ int main() {
// и читает из fifo, в который пишет сервер (fifo_to_client).
IpcPipeChannel ch("/tmp/fifo_to_client", "/tmp/fifo_to_server");
// RPC‑уровень: прокси поверх канала.
MyServiceProxy proxy(ch);
// RPC‑уровень: создаём marshaller поверх канала и передаём его в прокси.
ProxyMarshaller marshaller(ch);
MyServiceProxy proxy(marshaller);
int r = proxy.add(7, 8);
std::cout << "RESULT: " << r << std::endl;