basic structure and client process chain done
This commit is contained in:
parent
77657c7078
commit
83bd6fb796
21 changed files with 313 additions and 7 deletions
11
libs/communication/communication.c
Normal file
11
libs/communication/communication.c
Normal file
|
@ -0,0 +1,11 @@
|
|||
#include "communication.h"
|
||||
|
||||
int serialize_message(void *msg,long msg_size, unsigned char *out) {
|
||||
memcpy(out, msg, msg_size);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int deserialize_message(unsigned char *in,long msg_size, void *msg) {
|
||||
memcpy(msg, in, msg_size);
|
||||
return 0;
|
||||
}
|
9
libs/communication/communication.h
Normal file
9
libs/communication/communication.h
Normal file
|
@ -0,0 +1,9 @@
|
|||
#ifndef COMMUNICATION_H
|
||||
#define COMMUNICATION_H
|
||||
|
||||
#include <string.h>
|
||||
|
||||
int serialize_message(void *msg, long msg_size, unsigned char *out);
|
||||
int deserialize_message(unsigned char *in, long msg_size, void *msg);
|
||||
|
||||
#endif // !COMMUNICATION_H
|
Loading…
Add table
Add a link
Reference in a new issue