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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T11:44:24+00:00 2026-06-02T11:44:24+00:00

I want to develop a text protocol based on XML and transmitted via TCP/IP

  • 0

I want to develop a text protocol based on XML and transmitted via TCP/IP sockets.
Let’s say I have a simple request/response mechanism to be send over a persistent
TCP/IP connection between client and server like this:

<?xml version="1.0" encoding="UTF-8"?>
<request id="1" command="get.answer">
    <value type="string">Answer to the Ultimate Question of Life, the Universe, and Everything</value>
</request>

<?xml version="1.0" encoding="UTF-8"?>
<response id="1" command="get.answer">
    <value type="int32">42</value>
</response>

When should each side start to process the incoming data or in other words
when would the server know that the incoming client data is fully transfered
and possible to process to create a response?

Of course I made some research about that topic:
I found this answer which points in the right direction based on an HTTP example:
So using a kind of ‘Transfer Protocol’ on top of the XML messages would certainly help.

But I also looked at the purely XML-based XMPP protocol which doesn’t use any
‘Transfer Protocol’ like HTTP at least as far as I have seen.

From RFC 6120 at “2.4. Structured Data” it reads:

The basic protocol data unit in XMPP is not an XML stream (which
simply provides the transport for point-to-point communication) but
an XML “stanza”, which is essentially a fragment of XML that is sent
over a stream. The root element of a stanza includes routing
attributes (such as “from” and “to” addresses), and the child
elements of the stanza contain a payload for delivery to the intended
recipient.

So they send basically small XML chunks over TCP/IP w/o ‘Transfer Protocol’ and from
my wireshark traces I can see that there is also no special End-Of-Transmission character
at the end of each XML stanza like two times \r\n or something like that.
So how do they know about the end of a message (stanza)?

  • 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-02T11:44:27+00:00Added an answer on June 2, 2026 at 11:44 am

    Actually, XMPP uses an XML stream to transfer data. The data unit you are referring to is the actual exchange of individual messages, but they are all contained within an XML stream that define the start and endpoint of the communication for an XMPP session.

    This would be where the End Of Transmission occurs, as in end of all transmission. Within that stream, there are 3 defined packet types (IQ, Message and Presence) which would indicate the start and end of individual messages (for client to server comms).

    Although the basic case is done over a TCP connection, there are extensions to support different wireline protocols as well, such as HTTP which is useful for allowing XMPP through a firewall.

    If you want to do something similar, then you can follow the same approach, which is to start and end you XML stream when your connection is established and dropped. Then you simply need to define the individual message types, so your endpoints will know what constitutes a complete message.

    Or you could just use XMPP which seems to fit your use case perfectly.

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

Sidebar

Related Questions

i want to develop apps based on speech to text conversion.can you please share
I use VS2010,C# to develop ASP.NET web app, I have some two text boxes,
want to develop an app that can automatically respond to a received text, include
I want to develop an application based on Voice Biometric Recognition . Specifically, I
I want to develop a chat application with a server/client model, opening TCP or
I have an application which contains lot controls (i.e Buttons,text boxs ,etc..). i want
I want to develop one application which read text from the image. Which library
i want to develop an application which contain malyalam text for that i want
i want to develop an app to communicate with a webserver. I have an
develop one app speech to text conversion on mobile phones.i want to develop it

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.