RTC Forums
November 23, 2024, 09:24:00 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Serial/Deserialize objects  (Read 4657 times)
kaju74
Newbie
*
Posts: 25


« on: September 29, 2010, 05:03:34 PM »

Hi..

Is there any simple (maybe embedded) way to serialize/deserialize an object? I want to return an
object from a server to a calling client. My solution would be to use the Delphi functions "ObjectTextToBinary"
and "ObjectBinaryToText" and asBinaryStream...but is there any smarter solution for sending Delphi
objects between client/server?

If using "asBinaryStream", do you've any example how to use this on client/server-sides? My implementation
ends up with a lot of AV's  Huh Huh

Best regards,
Marc
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #1 on: September 29, 2010, 05:13:57 PM »

In my opinion, it is a bad idea to serialize objects by using general-purpose stream serialization functions. If you ask me, you should use RTC data types when sending data and write your own functions for moving data between your object types and TRtcValue objects.

See this topic for examples on using RTC data types.

Best Regards,
Danijel Tkalcec
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.024 seconds with 16 queries.