Confuse about LengthFieldBasedFrameDecoder

magiceye magiceye at 163.com
Tue May 24 22:58:40 EDT 2011


I have read LengthFieldBasedFrameDecoder doc, but I can't understand what is
the difference of implementing the decode method between its base
FrameDecoder.
The only difference I can figure out is that when I set initialBytesToStrip
to nonzero value, the decode method parameter buffer will not contain the
stripped data.
But what about others parameter? lengthFieldOffset, lengthFieldLength,
lengthAdjustment those 3 parameter's setting seems can not affect the decode
method compare to extends a FrameDecoder. 

So my question is: What things can LengthFieldBasedFrameDecoder help me to
do in writing decode method compare with extends from FrameDecoder? Or these
parameter just use to validate data received?

--
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Confuse-about-LengthFieldBasedFrameDecoder-tp6401217p6401217.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list