Protobuf data using Netty

"이희승 (Trustin Lee)" trustin at gmail.com
Mon Jan 10 01:06:01 EST 2011


If you use ProtobufVarint32FrameDecoder, you don't need to buffer
anything because ProtobufVarint32FrameDecoder will do it for you.  If
you can reproduce the problem, please feel free to post a unit test code.

Thanks,
Trustin

On 11/19/2010 06:11 AM, auron wrote:
> 
> Hi all - 
> 
> I'm a netty newbie but I have to say it's such an awesome framework! Within
> a couple weeks I was able to get a basic client/server app running over
> TCP/IP and using protobuf to communicate. I can't believe how easy it was
> despite the fact that I really have zero programming experience with
> client/server apps. 
> 
> I just had one question regarding using Netty + protobuf. I followed the
> example and I have a Server and Client talking to each other. However, I
> seem to run into this problem every once in awhile:
> 
> I have a simple proto class that just contains repeatable int32s. I build an
> array of size 1024 with a value of 1 in each element. When I send this over,
> 99.9% of the time it works fine. But every once in awhile, the data that
> gets received is not always a bunch of 1s. Sometimes the value 256 shows up. 
> 
> I remember reading in another example that you have to buffer the incoming
> messages (using a FrameDecoder? I think) because the data might not be
> completely sent over. I am using ProtobufVarint32FrameDecoder but perhaps I
> am not using it correctly. Anyway, I was just wondering if this type of
> error is possible. I can post my code if it will help. 
> 
> Thank you very much and have a great day!

-- 
Trustin Lee, http://gleamynode.net/

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


More information about the netty-users mailing list