summaryrefslogtreecommitdiff
path: root/IPC.h
blob: 9e497decbd1c7287a6308bc7f10e3428fe18debf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once

#include <sys/socket.h>
#include <sys/un.h>

#include "commands.h"
#include "config.h"
#include "util.h"

class IPCModule
{
public:
	IPCModule(CommandsModule& commandsModule, Config& cfg, Globals& globals);
	void doListen();
	void quitIPC();
	int getFD();
private:
	CommandsModule& commandsModule;
	Config& cfg;
	Globals& globals;
	int sockfd;
	int len;
	bool first = true;
	sockaddr_un address;
};