@Override
public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) throws Exception {
BigEndianHeapChannelBuffer message = (BigEndianHeapChannelBuffer) e.getMessage();
// System.out.println("messageReceived " + ctx.getChannel() + message.readableBytes());
received += message.readableBytes();
digest.update(message.array(), message.readerIndex(), message.readableBytes());
if (received > maxLength) {
System.out.println("messageReceived tid=" + Thread.currentThread().getId()
+ " " + id + " got " + received);
ctx.getChannel().close();
}