The data is enclosed with a standard tag format. In this case it is <mos>.....</mos>, so I know when I have received a complete message The message may or may not include carriage returns or line feeds. These would be removed anyway as they have no meaning within the message.
Graham -----Original Message----- From: TWSocket [mailto:twsocket-boun...@lists.elists.org] On Behalf Of François Piette Sent: 08 October 2013 19:57 To: 'ICS support mailing' Subject: Re: [twsocket] Delphi TServerSocket vs ICS equivalent > How the messages are sent to me is out of my control. But the client > will not send me another > message until the previous one has been acknowledged. If I don't > respond at all the client will > timeout, close the socket connection, re-open it and send the original message again. If your XML message has no delimiter, then you must parse it on the fly - which is possible - so that you know when it is complete and time to process it. This is a perfectly usable strategy but this is not what is usually done. Usually, either there is a delimiter at the end of the data, or there is a length expressed in front of data. The receiver then knows when everything has been received without any knowledge - beside length or delimiter - of the "message" content. This helps building a layered application where transport and processing is clearly distinguished. Of course those considerations are not dependent on the component used. What you use with the old component is for sure good for ICS component as well. -- francois.pie...@overbyte.be Embarcadero MVP http://www.overbyte.be http://francois-piette.blogspot.com -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be