
public int size(Object msg) {
if (msg instanceof ByteBuf) {
return ((ByteBuf)msg).readableBytes();
} else if (msg instanceof ByteBufHolder) {
return ((ByteBufHolder)msg).content().readableBytes();
} else {
return msg instanceof FileRegion ? 0 : this.unknownSize;
}
}
--
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/81f1e04a-22f8-42a7-b8c4-50763b5062cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to ne...@googlegroups.com.