Are ChannelBuffers from a MessageEvent unique or pooled ?

Kr0e foxkroe at online.de
Thu Sep 15 07:11:17 EDT 2011


Hi!

I'm working on a RMI alternative which is based on Netty3 and almost
complete, but there is a remaining question:

If the NioWorker triggers a "messageReceived" Event it creates a
ChannelBuffer using the Channel's ChannelBufferFactory and call
.setBytes(directPooledBuffer). So I guess this buffer is not pooled. Is this
correct ? I'm working on an own FrameDecoder-like decoder where I create a
composite (ChannelBuffers.wrappedBuffer(...) buffer to cumulate buffers
until enough bytes are present to actually decode the frame. But I need to
know whether or not the given buffers of MessageEvents are pooled. If they
are pooled my solution would probably not work.

The FrameDecoder impl. uses a dynamic buffer to copy the bytes from the
MessageEvent which would not necessary if the buffers are not pooled. 

Thanks!

Regards,

Chris



--
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Are-ChannelBuffers-from-a-MessageEvent-unique-or-pooled-tp6796412p6796412.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list