Problem in LengthFieldBasedFrameDecoder

"Trustin Lee (이희승)" trustin at gmail.com
Tue Apr 6 01:52:12 EDT 2010


Hi,

LengthFieldBasedFrameDecoder is for binary protocols, which means the
length field must be encoded in binary encoding.  It seems like the
length field of your message is encoded in text encoding.  You have to
write your own decoder.

HTH,
Trustin

Balaaji Dayalarajan wrote:
> Hi,
>     I am running a server written in netty API with the following
> configuration 
> 
> new LengthFieldBasedFrameDecoder(14,0,2,0,2)
> 
> and send the following message "12HELLO, WORLD" continiously in a loop to
> the server.
> 
> I expect the server to decode the message and output this value "HELLO,
> WORLD" instead
> the handler complains
> org.jboss.netty.handler.codec.frame.TooLongFrameException: Adjusted frame
> length exceeds 14: 12596
> 
> the documentation for LengthFieldBasedFrameDecoder does'nt speak up about
> "maxFrameLength" value. why is the code complaining about the specific value
> "12596"?
> 
> if any body has used LengthFieldBasedFrameDecoder.Kindly pass on the
> configuration and sample message used.
> 
> any suggestions/views/comments to fix this is greatly appreciated.
> 
> Thanks in advance
> Balaaji.D
> 

-- 
what we call human nature in actuality is human habit
http://gleamynode.net/


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
Url : http://lists.jboss.org/pipermail/netty-users/attachments/20100406/da1c55ce/attachment-0001.bin 


More information about the netty-users mailing list