Re: structs for data transfer?
From: John Harrison (john_andronicus_at_hotmail.com)
Date: 09/21/04
- Next message: John Harrison: "Re: Computing pi to nth terms?"
- Previous message: John Harrison: "Re: strnicmp in stl string class?"
- In reply to: Phlip: "Re: structs for data transfer?"
- Next in thread: nospam: "Re: structs for data transfer?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 21 Sep 2004 06:57:38 +0100
"Phlip" <phlip_cpp@yahoo.com> wrote in message
news:qxB3d.21906$ZC7.12709@newssvr19.news.prodigy.com...
> John Harrison wrote:
>
>> Write some code to convert the struct you want to send into a char array.
>> Write some code to turn that char array back into a struct. Use the first
>> piece of code when you send, the second when you recieve. Trying to send
>> anything more complicated than char arrays between different types of
>> computers is asking for trouble.
>
> Oh, and then you must figure out either a length system for each part of
> the
> string, or sentinels and delimeters for the ends of strings. Then you must
> figure out how to escape the delimiters if your users type them inside
> strings. Then you might need a system to name each data element.
>
> Oh, and then you might localize, and need to pack UTF-8 into your strings.
>
> Use XML. If HTTP is slow, even to a server you programmed, then rewrite a
> simpler version of it.
>
Good advice but I got the impression that XML might be a bit beyond the OP.
john
- Next message: John Harrison: "Re: Computing pi to nth terms?"
- Previous message: John Harrison: "Re: strnicmp in stl string class?"
- In reply to: Phlip: "Re: structs for data transfer?"
- Next in thread: nospam: "Re: structs for data transfer?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|