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

21 lines
600 B
C

#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;
};
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);
void remote_message_free (struct remoted_msg *msg);
void remote_message_print (const struct remoted_msg *msg);
#endif