private void generateTraffic() {
// Fill the outbound buffer up to 64KiB
ByteBuf out = ctx.nextOutboundByteBuffer();
while (out.readableBytes() < 65536) {
out.writeBytes(content, 0, content.readableBytes());
}
// Flush the outbound buffer to the socket.
// Once flushed, generate the same amount of traffic again.
ctx.flush().addListener(trafficGenerator);