On Tue, Oct 21, 2008 at 3:32 PM, newToMina <[EMAIL PROTECTED]> wrote:
>
> Ok. If I understood correctly, as long as the clients write one xml document
> at a time to the socket, then most of problems should go away, correct? If
> that is the case, the only problem (or are there more?) I could see is in
> the event of one message spanning over multiple reads. If I extend the
> TextLineDecoder and read until it find the end root tag shouldn't it take
> care of that problem too?

One xml document written in a socket could mean several reads on the
other side, and could (potentially at least) take minutes, hours, days
to arrive, so you can't rely on that.

Can't you add a header and footer to the message you send? Something like
--header--<xml ...>...</xml>--end--

where --header-- and --end-- may be a String or a single byte
indicating the end of the document

Reply via email to