DelimiterBasedFrameDecoder and last frame
Gabriel Landais
gabriel.landais at gmail.com
Tue Aug 9 08:36:41 EDT 2011
Hi,
never believe the code implementing a protocol... The developper before me
was completely wrong and certainly did not read the specs...
So it was far more simple than expected to implement a custom
FrameDecoder<https://gforge.inria.fr/scm/viewvc.php/Maven/gazelle-proxy/trunk/gazelle-proxy-netty/src/main/java/net/ihe/gazelle/proxy/netty/protocols/hl7/HL7FrameDecoder.java?view=markup&root=gazelle>
(external
link to viewvc on our forge)
Regards
Gabriel
2011/8/8 Gabriel Landais <gabriel.landais at gmail.com>:
> Hi,
> I've created a proxy for our needs
> (http://scm.gforge.inria.fr/svn/gazelle/Maven/gazelle-proxy/trunk).
> We are able to add some protocols and store messages seen on the
> channel, but we have a problem with HL7v2 and TCP SYSLOG.
> Those protocols are delimiter based. But some companies implement it
> as if closing the channel was sending a last delimiter.
> I've read the DelimiterBasedFrameDecoder which is used to capture the
> messages, but I have no good idea on how to add the behaviour on
> decodeLast of FrameDecoder.
>
> My idea would be to override decode and decodeLast calling a decode
> with a isLast parameter. Then if it's not last, keep the current
> behaviour, otherwise always return the last frame. Is it a good way to
> do it? Should I open a bug report and submit a patch?
>
> Regards
> Gabriel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/netty-users/attachments/20110809/6216cf38/attachment.html
More information about the netty-users
mailing list