Hi,
I believe you are using winsock2 for socket programming,if you are using send function call in the server this is the sample code by me:
struct myStruct {
int a,b;
}myStruct1;
void* myPtr = &myStruct1;
send(client,(char*)myPtr,sizeof(myStruct1),0);
In client side code you can typecast it back to the required struct type.