x***@gmail.com
2013-05-03 09:27:43 UTC
Hi guys,
I have a program that I want to split into a server and client. The server to make the heavy calculations and the client just to use the ready data.
So my first question is how to do it:
1. Simple string TCP/IP sending some custom protocol
2. Serialization and then via TCP/IP
The problem with 1 is that it will be very complicated because I have a class with the result of the calculations in which I have int, CString, CArray, and class objects which in them self also have CArrays. So making all that in a string protocol is near impossible.
So I am leaning for method 2. But I have 0 experience with serialization. If I want to serialize the class that contains the result, can I just serialize it, or I have to serialize all sub classes also/variables too? And how to do it?
Also which method is faster, as I am reading that serialization is a bit slow.
I have a program that I want to split into a server and client. The server to make the heavy calculations and the client just to use the ready data.
So my first question is how to do it:
1. Simple string TCP/IP sending some custom protocol
2. Serialization and then via TCP/IP
The problem with 1 is that it will be very complicated because I have a class with the result of the calculations in which I have int, CString, CArray, and class objects which in them self also have CArrays. So making all that in a string protocol is near impossible.
So I am leaning for method 2. But I have 0 experience with serialization. If I want to serialize the class that contains the result, can I just serialize it, or I have to serialize all sub classes also/variables too? And how to do it?
Also which method is faster, as I am reading that serialization is a bit slow.