Re: structs for data transfer?
From: Phlip (phlip_cpp_at_yahoo.com)
Date: 09/20/04
- Next message: JKop: "std::string, Append a number"
- Previous message: Peter van Merkerk: "Re: How to create Excel-files?"
- In reply to: John Harrison: "Re: structs for data transfer?"
- Next in thread: John Harrison: "Re: structs for data transfer?"
- Reply: John Harrison: "Re: structs for data transfer?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 20 Sep 2004 14:10:30 GMT
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.
-- Phlip http://industrialxp.org/community/bin/view/Main/TestFirstUserInterfaces
- Next message: JKop: "std::string, Append a number"
- Previous message: Peter van Merkerk: "Re: How to create Excel-files?"
- In reply to: John Harrison: "Re: structs for data transfer?"
- Next in thread: John Harrison: "Re: structs for data transfer?"
- Reply: John Harrison: "Re: structs for data transfer?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|