Scattering/GatheringByteChannel and Netty
Aaron Whiteside
aaronjwhiteside at gmail.com
Sat Jul 11 02:25:47 EDT 2009
Hi, I'm a new user to Netty and I have a question..
Does Netty support the NIO scattering/gathering byte channels at a high
level? What would be really nice to have is the ability to somehow combine a
FrameDecoder and a ChannelBufferFactory so that one could use a heap based
buffer for ones protocol headers and a direct buffer for the protocols data
payload.
The reasoning behind such an idea is that I am not interested in parsing the
data payload in my application, all I want to do is persist it to disk or
write it off to another connection. And using direct buffers for this means
I get the most efficiency possible. But with the protocol headers I do want
to parse those and I would prefer not to incur the overhead of
reading/writing a direct buffer from the java space, since heap based
buffers are much more efficient in this case.
I hope I have managed to convey my question coherently enough that you may
point me in the right direction. Netty may already provide a solution to my
question that I am too blind to see.
On an ending note I must say I am thoroughly impressed with Netty it has a
clean and beautiful API the likes of which i haven't seen in years, if at
all.
Cheers,
Aaron
--
View this message in context: http://n2.nabble.com/Scattering-GatheringByteChannel-and-Netty-tp3241051p3241051.html
Sent from the Netty User Group mailing list archive at Nabble.com.
More information about the netty-users
mailing list