Quote Originally Posted by BENCHMARKMAN View Post
Ok but If the client is sending a struct that has been cast to a const char how should the server read the message and be able to access the struct members? This is what I'm confused on.
read just sticks the data into memory wherever you tell it to put it. So
struct mystruct bob;
read(sockfd, (void *)&bob, sizeof bob);
printf("%d %d\n", bob.int1, bob.int2);
or whatever you called your struct variables.