Bug with DelimiterBasedFrameDecoder + Delimiters.nulDelimiter() orI am doing it wrong?
miarkus at tlen.pl
miarkus at tlen.pl
Thu Jul 30 01:48:16 EDT 2009
Hi!
What actionscript version are you using? 2.0 or 3.0? There was (and I'm not
sure if it's still an issue) a known null byte issue with AS 2.0 regarding
the null byte.
That was the reason why I had to port my AS 2.0 application to AS 3.0.
Also instead of using XMLSocket object you can use raw Socket class (AS 3.0)
that will give you more control over sending data.
Best
Pete
----- Original Message -----
From: "NicolasDesy" <liguorien at hotmail.com>
To: <netty-users at lists.jboss.org>
Sent: Thursday, July 30, 2009 12:20 AM
Subject: Bug with DelimiterBasedFrameDecoder + Delimiters.nulDelimiter() orI
am doing it wrong?
>
> Hello all,
>
> First of all, I'm quite new to Netty. I have used to create a small adobe
> policy file server and that's about it.
>
> I'm currently working on an app based on master/slaves model. I decided
> to
> use netty for the communication between the master and the slaves.
>
> I have currently the following pipelineFactory on the master :
>
> public ChannelPipeline getPipeline() {
> ChannelPipeline pipeline = Channels.pipeline();
> pipeline.addLast("decoder",
> new DelimiterBasedFrameDecoder(1024,
> Delimiters.nulDelimiter()));
> pipeline.addLast("handler",
> new MasterHandler());
> return pipeline;
> }
>
>
> On the client side, I send a version request to the server to be sure the
> master and the slave are using the same build. The request consist of 5
> byte. An integer which represents the command ID and the a null(0) byte.
>
> I looked a little bit a the source and it seems like the decoder considers
> that every single messages contain a null byte because it invokes the
> unfoldAndFireMessageReceived() every time it received a "messageReceived"
> event. Which result in my handler receiving the "messageReceived" event
> everytime even if the current message has not been fully received yet.
>
>
> I changed my code to use a custom delimiter instead of
> Delimiters.nulDelimiter() and now it works fine.
>
> Is it a bug or I am doing something wrong?
>
> Thanks in advance,
> Nicolas
> --
> View this message in context:
> http://n2.nabble.com/Bug-with-DelimiterBasedFrameDecoder-%2B-Delimiters.nulDelimiter%28%29-or-I-am-doing-it-wrong--tp3353009p3353009.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
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 4289 (20090729) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>
More information about the netty-users
mailing list