Encoder for binary protocol

xtremed dipanjan.deb at gmail.com
Mon Jul 26 01:11:20 EDT 2010


Thanks Bruno, for the response.

Yes, we already have the encoded message in a StringBuffer and we need to
get it across to a ChannelBuffer because as we understand that is the only
way to get Netty to send it on the socket. Even one copying is ok with us if
that cannot be avoided.

I missed stating the fact that our message structure itself is dynamic; that
is depending on the opcode, the structure of the message after that will
vary. Actually, up to the opcode is a message header (constant) and after
that the actual message varies depending on the opcode. And there are
several opcodes and further increasing as the application grows. This means
that we cannot use a static data structure as you suggested.

May be we could change our message assembling class to use a ChannelBuffer
in the first place instead of a StringBuffer? Is that a way? Or do you have
any other suggestion?

Thanks again,
Deb
-- 
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Encoder-for-binary-protocol-tp5332889p5336703.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list