summaryrefslogtreecommitdiff
path: root/IPC.cpp
diff options
context:
space:
mode:
authorBossCode45 <human.cyborg42@gmail.com>2023-10-29 18:34:27 +1300
committerBossCode45 <human.cyborg42@gmail.com>2023-11-12 15:03:34 +1300
commitf998705c5a0e50021875a811537962083b73ed26 (patch)
tree113406756207737ca3cee23809d1b020ee001cab /IPC.cpp
parent5dacf6d6d24eab71994e02b6b3c4fc6f6e309958 (diff)
downloadYATwm-f998705c5a0e50021875a811537962083b73ed26.tar.gz
YATwm-f998705c5a0e50021875a811537962083b73ed26.zip
feat: Pretty much done IPC
Still need to add a program that uses the IPC, this potentially requires restructuring the files
Diffstat (limited to 'IPC.cpp')
-rw-r--r--IPC.cpp10
1 files changed, 8 insertions, 2 deletions
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 <cstring>
+#include <string>
#include <sys/socket.h>
#include <iostream>
#include <unistd.h>
@@ -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()