Archived
3
0
This repository has been archived on 2024-06-18. You can view files and clone it, but cannot push or open issues or pull requests.
libipc-old/remote/lib/message.h

21 lines
600 B
C
Raw Normal View History

#ifndef __REMOTE_MSG_H__
#define __REMOTE_MSG_H__
#define REMOTE_MSG_TYPE_CONNECT 1
#define REMOTE_MSG_TYPE_LISTEN 2
#define REMOTE_MSG_TYPE_PUB 3
struct remoted_msg {
unsigned char type; // message types = commands (connect, listen, ...)
char *data;
size_t datalen;
};
2018-10-03 21:52:11 +02:00
void remote_message_serialize (const struct remoted_msg *msg, char **data, size_t *len);
void remote_message_unserialize (struct remoted_msg *msg, const char *data, size_t len);
2018-10-03 21:52:11 +02:00
void remote_message_free (struct remoted_msg *msg);
void remote_message_print (const struct remoted_msg *msg);
#endif