how do I send structures using csocket across network?

Please support our C advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Sep 2005
Posts: 17
Reputation: perlsu is an unknown quantity at this point 
Solved Threads: 0
perlsu perlsu is offline Offline
Newbie Poster

how do I send structures using csocket across network?

 
0
  #1
Feb 14th, 2006
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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC