I have a little error wih my netty-server. I need to transfer different byteBuf sizes (the send-buffers capacity is dynamicly increased).
byte[] buffer = text.getBytes();
byteBuffer.writeInt(buffer.length);
if (byteBuffer.capacity() < (byteBuffer.writerIndex() + buffer.length))
System.out.println("Increased Buffer Capacity to " + byteBuffer.capacity(byteBuffer.capacity() + buffer.length).capacity());
byteBuffer.writeBytes(buffer);
It outputs the new (increased) capacity of the byteBuf but when the Server reads the byteBufs capacity is not the increased one and it outputs errors.
Thanks for your help