UDP fragmention?

"Trustin Lee (이희승)" trustin at gmail.com
Wed Jan 6 07:06:22 EST 2010


Luis Neves wrote:
> Hi,
> 
> On Sun, Jan 3, 2010 at 1:36 PM, "Trustin Lee (이희승)" <trustin at gmail.com> wrote:
>> Hi,
>>
>> In case of UDP, a packet is truncated or dropped if it is larger than a
>> certain size, depending on router configuration.  IPv4 routers truncate
>> and IPv6 routers drop IIRC.  That's why it is safe to send small packets
>> in UDP.
> 
> 
> I was having the exact same problem, reading the source of QOTM server
> helped me find the solution, but there seems to be some kind of error.
> 
> It reads:
> 
> "b.setOption("receiveBufferSizePredictorFactory",new
> FixedReceiveBufferSizePredictorFactory(1024));"
> 
> 
> Looking at the source the key "receiveBufferSizePredictorFactory"
> seems to be completely ignored. what worked from me was:
> 
> "b.setOption("receiveBufferSizePredictor",(new
> FixedReceiveBufferSizePredictorFactory(1024)).getPredictor());"

There was actually a bug in the DagagramChannelConfig implementation.  I
have checked in the fix so that the option works.

The "receiveBufferSizePredictor" option might not work as expected if
you are creating many channels from one bootstrap.  It is always
recommended to use receiveBufferSizePredictorFactory.
receiveBufferSizePredictor is supposed to be used only when you want to
change the predictor in the middle of the connection.

HTH,
Trustin

-------------- 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/20100106/b5cb3ecc/attachment.bin 


More information about the netty-users mailing list