while (msg.readableBytes() > chunkSize) {
ByteBuf chunk = Unpooled.buffer(chunkSize);
chunk.writeBytes(createChunkHeader(chunkSize));
while (msg.readableBytes() > chunkSize) {
ByteBuf chunk = Unpooled.buffer(chunkSize);
chunk.writeBytes(createChunkHeader(chunkSize));