i am finalizing a client/server program where the client is executing binary code by using a stack. The client must me able to connect to a server who will then continue the stack execution. To do this, i need to send my stack structure to the server. So i need to serialize my "stack" object first and then deserialize it but i'm not good at that close pointer manipulation. I've been looking for a lib, but JSON and Prot-c from google seem heavy and complicated, so if i could get some help to manually serialize/deserialize that stack it would be really handy.
My stack is based on a list implementation:
struct list {
int Element;
list next;
};
struct stack
{
list l;
};
What's the easyiest way for me to send an existing "stack" object to my server ?
Thanx!