use of io.netty.handler.timeout.ReadTimeoutHandler in project reactor-netty by reactor.
the class Application method main.
public static void main(String[] args) {
DisposableServer server = HttpServer.create().doOnConnection(conn -> conn.addHandler(new ReadTimeoutHandler(10, TimeUnit.SECONDS))).doOnChannelInit((observer, channel, remoteAddress) -> channel.pipeline().addFirst(// <2>
new LoggingHandler("reactor.netty.examples"))).bindNow();
server.onDispose().block();
}
Aggregations