I have a structure:
typedef struct{
int flags;
int length;
void* message;
}Message;
The length of message is variable.For example:
Message msg;
msg.flags=0;
char buf[]="abcdef";
msg.length=strlen(buf);
msg.message=buf;
How can i send the structure from client to the server with socket? Someone help me!or give me some advisements.