Hi Pietro Is it possible for you to edit your custom protocol to add package delimiter or package length information?
<Start_Indicator>YOUR_CUSTOM_PACKET<End_isdicator> or <PackageLength>YOUR_CUSTOM_PACKET Note : You should decide maximum how many bytes can be used for length... Thanks Erkin On Fri, Apr 24, 2009 at 4:49 PM, Pietro Guerrieri <[email protected]>wrote: > Hi, > I'm italian and sorry for my bad english > > I have a problem with MINA 2.0, I need help > > I must recive e stream of tcp of variable string. > > Examples of string: > 01999935http://mina.apache.org/contact.html > or better is: > first 2 position is myAction (in this examples is "01") > then come the year (in this example is "9999") > then the len of the URL (in this example is "35") > ..and the URL (http://mina.apache.org/contact.html) > > so I have a message (in tcp protocol) like the examples > [myAction]01[year]9999[len]35[URL]http://mina.apache.org/contact.html > > my problem is that i recive a lot of this messages with variable length, > for > example > 01200935 > > http://mina.apache.org/contact.html03200922http://mina.apache.org01200915mina.apache.org... > .. > and so long > > that splitted are: > 01200922http://mina.apache.org > 03200935http://mina.apache.org/contact.html > 01200915mina.apache.org > > this stream of messages are very long and continuous for long time (also > one > week) so I recive a long stream of tcp packets like: > ....01200935 > > http://mina.apache.org/contact.html03200922http://mina.apache.org01200915mina.apache.org01200935http://mina.apache.org/contact.html03200922http://mina.apache.org01200915mina.apache.org01200935http://mina.apache.org/contact.html03200922http://mina.apache.org01200915mina.apache.org. > .. > .. > > how I can read/recive a continuous and infinite variable string over tcp > packets with MINA!?! > > thank you > Pietro >
