mina-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Tomczyk <tomcz...@gmail.com>
Subject Re: sending String and fragmentation
Date Mon, 23 Jan 2012 23:55:47 GMT
Ok i get it, and yes, you were right it was my fault i just forgot to put
one line of code ( break; ) in client decoder. But still another problem
appears when Messages sended by one side contains more than one String (or
couple of messages with String each).

- as the incoming byte[] can be fragmented (ie, there is no guarantee
> whatsoever that the bytes won't be send one byte by one byte to the remote
> peer), you have to deal with this fragmentation.

Can you explain me how ? Or give me some examples, because i didnt find any
straight answer on mailinglists.

> This is only a problem on the decoder size (we don't fragment anything
> when we send data : we consider a message as a whole), and the only way to
> deal with this fragmentation is to accumulate the incomig bytes before
> doing the decoding of a complete message

How to do this ? besides example which i put in first post.

> (or you have designed a decoder that can accept a non-complete PDU, and
> capable of building incomplete message until it received everything needed
> to complete it);
No i havent

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message