A small enhancement to ReplayingDecoder
"이희승 (Trustin Lee)"
trustin at gmail.com
Tue Nov 23 01:26:49 EST 2010
You can call checkpoint(PARAM_COUNT) and return null. If the checkpoint
has been changed, ReplayingDecoder will call decode() once again. Then,
the switch block will be evaluated again. HttpMessageDecoder uses this
technique.
HTH
brunodecarvalho wrote:
> Trustin,
>
>
> The counter works just fine for straightforward protocols, but what if you'd
> want to jump from PARAM_VALUE back to PARAM_COUNT again (in the context of
> the same message)?
>
> That's why I proposed the extension that runs in a continuous loop. It uses
> the checkpoints but allows you to jump to any of the available targets,
> rather than just falling down the switch.
>
> I actually only used it once - most of the binary stuff I implement is very
> straightforward - but in this one integration I had to do, the structure of
> the messages was really tricky and this came in just handy.
>
>
> Cheers,
> Bruno
>
--
Trustin Lee - http://gleamynode.net/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 290 bytes
Desc: OpenPGP digital signature
Url : http://lists.jboss.org/pipermail/netty-users/attachments/20101123/12fc9075/attachment.bin
More information about the netty-users
mailing list