DelimiterBasedFrameDecoder delimiter

Zlatko Josic zlatko.josic at gmail.com
Fri Jun 24 05:08:46 EDT 2011


Yes I am shure, The delimiter is "\n\r" . We have system based on Mina
framework and now we want to extend it to work with Netty framework too.
I have tried with pipeline.addLast("frameDecoder", new
DelimiterBasedFrameDecoder(2048, ChannelBuffers.wrappedBuffer(new byte[] {
'\n', '\r' })));
but it works as it has two delimiters '\n' and '\r'.

So it seams the only solution is writting custom decoder.

Zlaja


On Fri, Jun 24, 2011 at 9:45 AM, Olivier ROLAND
<olivier.roland at laposte.net>wrote:

>
> >
> > Hi,
> >
> > Is it possible to have String delimiter in DelimiterBasedFrameDecoder?
> For
> > example I want to have "\n\r" as delimiter. So if I have string line
> "hello
> > world\n\r" I want to get one frame from DelimiterBasedFrameDecoder
> instead
> > of two.
> >
> > Thanks
> >
> > Zlaja
> >
> > --
> > View this message in context:
> http://netty-forums-and-mailing-lists.685743.n2.nabble.com/DelimiterBasedFrameDecoder-delimiter-tp6510246p6510246.html
> > Sent from the Netty User Group mailing list archive at Nabble.com.
> > _______________________________________________
> > netty-users mailing list
> > netty-users at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/netty-users
> >
>
> You can of course implement a custom delimiter if you really want \n\r in
> that order but are you sure ;-)
> Use org.jboss.netty.buffer.ChannelBuffer.Delimiters as an example.
> If you want  to deal with standard \r\n see
> org.jboss.netty.example.telnet.TelnetServerPipelineFactory as an example.
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/netty-users/attachments/20110624/9ff824b4/attachment.html 


More information about the netty-users mailing list