Hello I have a Netty Server with a handler that should accept strings. It seems to only receive content up to 1024 bytes. How can i increase Buffer size. I have already tried
bootstrap.setOption("child.sendBufferSize", 1048576);
bootstrap.setOption("child.receiveBufferSize", 1048576);
without success.
The handler is as below
public class TestHandler extends SimpleChannelHandler {
@Override
public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) {
ChannelBuffer buf = (ChannelBuffer) e.getMessage();
String response = "";
if (buf.readable()) {
response = buf.toString(CharsetUtil.UTF_8);
System.out.println("CONTENT: " + response);
}
System.out.println(response);
}
@Override
public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) {
e.getCause().printStackTrace();
Channel ch = e.getChannel();
ch.close();
}
}