perlsu 0 Newbie Poster

I use CSocket with send() and recv() to send and receive structure packets of type Packet as follows:

class Packet {
int dataLen;
char data[1024];
} packet;


I tried but the received structure elements contained garbage. What would the code be on the send and receive sides of the app ? Please help.

Rgds.
perlsu