From f998705c5a0e50021875a811537962083b73ed26 Mon Sep 17 00:00:00 2001 From: BossCode45 Date: Sun, 29 Oct 2023 18:34:27 +1300 Subject: feat: Pretty much done IPC Still need to add a program that uses the IPC, this potentially requires restructuring the files --- IPC.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'IPC.cpp') diff --git a/IPC.cpp b/IPC.cpp index 215a15c..0aed97e 100644 --- a/IPC.cpp +++ b/IPC.cpp @@ -1,6 +1,8 @@ #include "IPC.h" +#include "ewmh.h" #include +#include #include #include #include @@ -22,11 +24,16 @@ IPCModule::IPCModule(CommandsModule& commandsModule, Config& cfg, Globals& globa if(bind(sockfd, (sockaddr*)&address, len) == -1) { - cout << "ERROR" << endl; + cout << "ERROR " << errno << endl; } cout << "SOCKETED" << endl; } +void IPCModule::init() +{ + setIPCPath((unsigned char*)path, strlen(path)); +} + void IPCModule::doListen() { if(listen(sockfd, 1) != 0) @@ -69,7 +76,6 @@ void IPCModule::doListen() void IPCModule::quitIPC() { close(sockfd); - cout << path << endl; } int IPCModule::getFD() -- cgit v1.2.3