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 7752083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:42:35+00:00 2026-06-01T11:42:35+00:00

I am supposed to get some XML data from the server say, <?xml><a></a><?xml><a></a><?xml><a></a><?xml><a></a> Suppose

  • 0

I am supposed to get some XML data from the server say,

     <?xml><a></a><?xml><a></a><?xml><a></a><?xml><a></a>

Suppose the packets are received in the following order

     <?xml><a>
     </a><?xml><a></a><?xml>
     <a></a>

How can I formulate the logic to parse this kind of data?

  • 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-01T11:42:36+00:00Added an answer on June 1, 2026 at 11:42 am

    The short answer is that you don’t need to worry about the order; TCP handles reassembly for you.

    TCP is a streaming protocol, and each packet contains a sequence number that allows the network stack to reassemble incoming packets in the right order. It will also automatically re-send any packets that get dropped or corrupted during transmission. However, unlike UDP, which transmits a complete message at a time, TCP just keeps sending data until the connection closes, with no protocol-level concept of individual messages.

    I think your question isn’t about ordering, but about knowing when you’ve received all of the data. There are generally two ways to go about that.

    First, the server can close the connection when it’s finished sending the data. The client makes a request, accumulates the response until the connection is closed, and then passes all of the data it received onward to the application.

    Second, an application can frame the data itself, either by marking the end of each message or by inserting a byte count at the beginning of each message. The receiver waits for the specified number of bytes to arrive and passes them on to the application.

    There’s actually a third method, but it’s error-prone and generally considered poor practice: the client can simply wait until it stops receiving data for some length of time, assuming the timeout indicates the end of a message. But this can cause unnecessary delays while the client waits for the timeout, and it can also indicate the end of a message prematurely if there are large delays in the network. You should consider it a fail-safe that prevents the client from hanging if the server “goes away” in the middle of a message, or you can use it as a last resort if none of the other methods will work. But there’s a good chance it will fail intermittently, so don’t tell anyone you heard it from me. 🙂

    Good luck!

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

Sidebar

Related Questions

In my application i need to get some data from server using http. The
Suppose we have some .xml files containing, amongst other things, MIDI note data. Since
I have one simple app that suppose to get information from user and send
Suppose you want to get a record from database which returns a large amount
I am loading some XML data, building it into an unordered list and displaying
I've got some simple XML-handling code that's supposed to locate a child node of
All, I'm working on a Flash application that's supposed to send XML data to
How can I access this element: <input type=submit value=Save as XML onclick=some code goes
I am trying to access some basic info from an XML based API. I'm
I am trying to get some data through ajax and I for whatever reason,

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.