I need to send a dynamic array of objects from server to clients. An example as array which cointains objects of class Figure
with information about its coordiantes, color etc.
I was trying to use something like this to send data:
for i := 0 to ServerSocket.Socket.ActiveConnections - 1 do
begin
ServerSocket.Socket.Connections[i].SendText(some values); // then parsing this text to get values
end;
but it's really bad way to do like that I think. So, please, could you show me the right way of how to send and recieve array of some objects (using IdTCPClient/Server
or Client/ServerSockets
)?