b.childOption(ChannelOption.TCP_NODELAY , true);
}
b.childOption(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT);
- customizeBootstrap(b);
if (b.group() == null) {
b.group(bossGroup, workerGroup);
return f;
}
- /**
- * Customize a server bootstrap before the server is created. This allows
- * subclasses to assign non-default server options before the server is
- * created.
- *
- * @param bootstrap Server bootstrap
- */
- protected void customizeBootstrap(final ServerBootstrap bootstrap) {
- // The default is a no-op
- }
-
- /**
- * Customize a client bootstrap before the connection is attempted. This
- * allows subclasses to assign non-default options before the client is
- * created.
- *
- * @param bootstrap Client bootstrap
- */
- protected void customizeBootstrap(final Bootstrap bootstrap) {
- // The default is a no-op
- }
-
/**
* Creates a client.
*
}
});
- customizeBootstrap(b);
setWorkerGroup(b);
setChannelFactory(b);
b.option(ChannelOption.SO_KEEPALIVE, true);
- customizeBootstrap(b);
setWorkerGroup(b);
setChannelFactory(b);