portingtools/src/data.hpp

25 lines
418 B
C++
Raw Normal View History

2022-11-09 16:08:54 +01:00
#pragma once
2022-11-07 01:01:36 +01:00
#include <stdexcept>
2022-11-05 18:07:20 +01:00
#include <sys/types.h>
namespace data {
2022-11-09 22:02:26 +01:00
const int serverbound_msg = 1;
const int clientbound_msg = 2;
2022-11-05 18:07:20 +01:00
2022-11-09 22:02:26 +01:00
key_t getIpcKeyFromExeName(char* argv0);
2022-11-05 18:07:20 +01:00
2022-11-09 22:02:26 +01:00
struct RequestMapMsg {
long msgtype;
2022-11-05 18:07:20 +01:00
2022-11-09 22:02:26 +01:00
unsigned int datalen;
char data[128];
};
2022-11-05 18:07:20 +01:00
2022-11-09 22:02:26 +01:00
struct ResponseMapMsg {
long msgtype;
2022-11-05 18:07:20 +01:00
2022-11-09 22:02:26 +01:00
unsigned int datalen;
char data[128];
};
}