Hi All:
When I configure sockets for a ServerBootstrap I have to use a SocketConfig:
final SocketConfig socketConfig = SocketConfig.custom()
.setSoTimeout(Timeout.ofSeconds(15))
.setTcpNoDelay(true)
.build();
server = ServerBootstrap.bootstrap()
.setListenerPort(port)
.setSocketConfig(socketConfig)
.setHttpProcessor(HttpProcessors.server(NHttpFileServerTestRule.class.getCanonicalName()
+ "/1.1"))
.register("*", new CustomHttpTestHandler())
.setExceptionListener(ExceptionListener.STD_ERR)
.create();
But when I configure sockets in an AsyncServerBootstrap, I have to use an
IOReactorConfig:
IOReactorConfig config = IOReactorConfig.custom().setSoTimeout(15,
TimeUnit.SECONDS).setTcpNoDelay(true).build();
server = AsyncServerBootstrap.bootstrap()
.setIOReactorConfig(config)
.register("*", new
AsyncServerRequestHandler<Message<HttpRequest, Void>>() {
This is confusing, I should be able to use the same kind of object in both
places.
Gary