Hi
This is my idea that you have to convert the structure to an char array, then transfer the char array into structure again.
Can you accept the following solution?
typedef struct
{
unsigned int intVar0,
float f1;
}intFloatSVar;
struct intFloatSVar p1;
char array[100];
p1.intVar0=10;
p1.f1=1.23;
memcpy(array,&p1,sizeof(intFloatSVar));
sendto(socket, array,sizeof(intFloatSVa),...);
On the receiver side,
recvfrom(socket,temp,sizeof(intFloatSVar),...);
memcpy(&p1,temp,sizeof(intFloatSVar));
you can recover the structure.
maybe the other people have good idea.
Hope it can help you.
BR
Xiangjun Rong