Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8890501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:31:02+00:00 2026-06-14T22:31:02+00:00

I need to send a dynamic array of objects from server to clients. An

  • 0

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)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T22:31:03+00:00Added an answer on June 14, 2026 at 10:31 pm

    You must serialize your dynamic arrays between clients and server.

    First attempt is to use your own serialization, e.g. using a #13#10 (CRLF) delimited content if this is an array of string, or a binary serialization otherwize.

    Under Delphi 7 (and up) you can use our dynamic array wrapper, which enables serialization into JSON or binary. It will do everything directly, using available RTTI. It will work will all basic types: integers, floating-points, strings, nested arrays, but not class instances.

    For a dynamic array of objects (class instances), you will need to make the serialization by hand. Using TReader may help, or you have to code it yourself. It could be a good idea to serialize all items on each side into one stream, then send the content at once, for better performance.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need send certain attributes(say, human readable user name) from server to client after
I'm dealing with dynamic allocated matrices, and need to send/recv them from a process
We need send h264 from flash to Wowza and after to vlc by RTSP
I need to send an HTML report with images from an application. The report
I need to send some information on a VxWorks message queue. The information to
I need to send some arguments from the iPhone to a php in the
I need to send emails from my web application (on account creation, password reset,
I have a dynamic listing of products which is being pulled from a MySQL
I need to build a dynamic form from database. I have following Entity to
I need to send a POST request using java. The server i am trying

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.