i made a camel netty4 server program.and client sent 1119 byte message but 
myu decoder truncated by 1024/95

here is my code.

@ChannelHandler.Sharable
    public static class BytesDecoder extends 
MessageToMessageDecoder<ByteBuf> {
        @Override
        protected void decode(ChannelHandlerContext ctx, ByteBuf msg, 
List<Object> out) throws Exception {
            // it may be empty, then return null
         System.out.println("BytesDecoder 
readableBytes:"+msg.readableBytes());
            if (msg.isReadable()) {
                // ByteBuf may not expose array method for accessing the 
under layer bytes
                byte[] bytes = new byte[msg.readableBytes()];
                int readerIndex = msg.readerIndex();
                msg.getBytes(readerIndex, bytes);
                out.add(bytes);
            }
        }
    }
 
result 
BytesDecoder readableBytes:1024
BytesDecoder readableBytes:95

i want to get a full message byte 1119 byte.


-- 
You received this message because you are subscribed to the Google Groups 
"Netty discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/netty/7060c6b2-f193-4da9-a788-7c31269c8d94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to