Example usage for io.netty.channel.epoll EpollChannelOption TCP_FASTOPEN

List of usage examples for io.netty.channel.epoll EpollChannelOption TCP_FASTOPEN

Introduction

In this page you can find the example usage for io.netty.channel.epoll EpollChannelOption TCP_FASTOPEN.

Prototype

ChannelOption TCP_FASTOPEN

To view the source code for io.netty.channel.epoll EpollChannelOption TCP_FASTOPEN.

Click Source Link

Usage

From source file:io.vertx.core.net.impl.transport.EpollTransport.java

License:Open Source License

@Override
public void configure(NetServerOptions options, ServerBootstrap bootstrap) {
    bootstrap.option(EpollChannelOption.SO_REUSEPORT, options.isReusePort());
    if (options.isTcpFastOpen()) {
        bootstrap.option(EpollChannelOption.TCP_FASTOPEN,
                options.isTcpFastOpen() ? pendingFastOpenRequestsThreshold : 0);
    }/*from  w ww.ja v  a  2 s.c  o m*/
    bootstrap.childOption(EpollChannelOption.TCP_QUICKACK, options.isTcpQuickAck());
    bootstrap.childOption(EpollChannelOption.TCP_CORK, options.isTcpCork());
    super.configure(options, bootstrap);
}