directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trustin Lee <trus...@gmail.com>
Subject Re: [mina] ByteBuffer and MessageDecoder/MessageEncoders
Date Mon, 30 May 2005 15:57:36 GMT
Hi Sander,

2005/5/30, Sander Aiaots aiaots@gmail.com: 
> 
> Or am I misunderstood, that TCP actually is like stream, so I must
> build mechanism how-to separate messages? Or is there some kind
> implementations exist in MINA already?

 You can get 33 bytes even if you wrote it separately. That is nature of 
TCP/IP. Your MesageDecoder should be able to recognize the end of message 
such as specifying the length of message in itself.
 
> On decode I read bytes out: byte[] buf = new byte[in.remaining()];
> in.get(buf, in.position(), in.remaining()); So why I am getting this
> ByteBuffer twice with same data?

 I didn't get it what you're talking. Could you please explain again?
 Thanks,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/

Mime
View raw message