Jack wrote:
Hi all,
I have a problem. I am writing a client server app in C. In my client
program, I have a simlple struct similiar to:
struct mySt{
int id;
char val;
struct mySt *next;
};
Sending raw struct's over the wire is a really bad idea, even between
homogeneous systems.
Depending on the compiler used, different padding may be used.
So don't do that... for more advanced protocols ASN.1 is typically used,
but for simpler applications, you can just define endian order of
binary data, and pass each struct member along the wire.
--
Tor