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?
Emmanuel Lecharny-3 wrote: > > newToMina wrote: >> What if the client writes multiple requests at once as follows. >> <root><msg>this is message 1</msg></root><root><msg>this is message >> 2</msg></root> >> >> How does the messageReceived() see it? How do I seperate and process >> these 2 >> xml messages (remember there are no controll characters seperating the >> xml >> documents) and send the corresponding 2 response messages back? Will it >> be >> through the same IOSession? Please bear with me if these questions sound >> silly, as I am trying to better understand how MINA works. >> > It's not really related to how MINA works : it's much more about TCP/IP. > In your case, you may perfectly receive N messages in one shot, if your > client is sending those messages this way. You will have to split them > and handle them separately in your handler. Not very simple ... > > -- > -- > cordialement, regards, > Emmanuel Lécharny > www.iktek.com > directory.apache.org > > > > -- View this message in context: http://www.nabble.com/MINA---design-guidelines-tp20077627p20095435.html Sent from the Apache MINA User Forum mailing list archive at Nabble.com.
