You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by hittih <mi...@sina.com> on 2007/08/30 09:52:07 UTC

big message problem

I'v implemented a server using MINA ,but now I have met a problem. Clients
send hudge message to my server.I find that MINA split a hudge message into
many smaller message,how can I get the right message?
-- 
View this message in context: http://www.nabble.com/big-message-problem-tf4352482s16868.html#a12402226
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.


Re: big message problem

Posted by Maarten Bosteels <mb...@gmail.com>.
On 8/30/07, Niklas Therning <ni...@trillian.se> wrote:
>
> hittih wrote:
> > I'v implemented a server using MINA ,but now I have met a problem.
> Clients
> > send hudge message to my server.I find that MINA split a hudge message
> into
> > many smaller message,how can I get the right message?
> >
> Even if your client writes a large chunk of bytes at once to a socket it
> doesn't mean that it will arrive at the server as one big chunk. It
> ain't MINA's fault, it's just the way it works. You will have to
> reassemble the split message into the original huge message on the MINA
> side. The ProtocolCodecFilter will help you out. Have a look at the
> examples.


And have a look at the tutorial:
http://mina.apache.org/tutorial-on-protocolcodecfilter.html

Maarten

HTH
>
> --
> Niklas Therning
> www.spamdrain.net
>
>

Re: big message problem

Posted by Niklas Therning <ni...@trillian.se>.
hittih wrote:
> I'v implemented a server using MINA ,but now I have met a problem. Clients
> send hudge message to my server.I find that MINA split a hudge message into
> many smaller message,how can I get the right message?
>   
Even if your client writes a large chunk of bytes at once to a socket it
doesn't mean that it will arrive at the server as one big chunk. It
ain't MINA's fault, it's just the way it works. You will have to
reassemble the split message into the original huge message on the MINA
side. The ProtocolCodecFilter will help you out. Have a look at the
examples.

HTH

-- 
Niklas Therning
www.spamdrain.net