| phil-news-nospam@ipal.net 2006-04-02, 7:41 pm |
| On 24 Mar 2006 02:01:45 -0800 mangesh sawant <mangesh@interinfosystems.com> wrote:
| first i have doubt wethere one can send structure over network .
It is very possible to do. I've done it. But there are big portability
issues that it is better to use other methods to address.
| Try following ,
| 1 - take a character array say char data[900] .
| 2 - strcpy(data , "");
| 3- strcat(data , "data u want to send");
Why not just
2 - strcpy(data, "data u want to send");
| now send this 'data' over network
Even that doesn't address portability issues of the struct itself is what is
copyed into the character array.
| i have done this for stream sockets . if raw sockets can send
| structures over network ignore this .
They can. You just have to be more careful.
--
-----------------------------------------------------------------------------
| Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
| (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------
|