Reading all bytes twice in a ReplayingDecoder
tnine
todd at spidertracks.com
Thu Jan 13 21:51:43 EST 2011
Hi all.
I'm having an issue I could use a hand with. I have my own custom TCP
protocol I must decode. Do do this, I've implemented my own subclass of a
ReplayingDecoder. It correct creates the object I need, however my output
object must also contain the entire array of bytes that was read (an
auditing requirement). Below is an example of my decoder.
https://gist.github.com/88dd0f8b5a42c2aa736d
I'm unable to use the .toByteBuffer(). I always receive this error.
org.jboss.netty.handler.codec.replay.UnreplayableOperationException
at
org.jboss.netty.handler.codec.replay.ReplayingDecoderBuffer.copy(ReplayingDecoderBuffer.java:91)
How can I replay all the bytes to set them into my output object after
reading them? I've also tried duplicate but I receive the same result. Do
I create another decoder that is inserted after my first one to get all the
bytes again?
Thanks,
Todd
--
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Reading-all-bytes-twice-in-a-ReplayingDecoder-tp5920532p5920532.html
Sent from the Netty User Group mailing list archive at Nabble.com.
More information about the netty-users
mailing list