--
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 netty+un...@googlegroups.com.
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.
public static class NettyDecoder2 extends ByteToMessageDecoder{
@Override
protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception {
if((in.readableBytes() < 1119) ) {
return;
}
String msg = in.toString(CharsetUtil.UTF_8);
in.readerIndex(in.readerIndex() + in.readableBytes());
out.add(msg);
}