private static Transport determineTransport() { Transport transport = new NativeTransport("io.netty.channel.epoll", "Epoll"); if (transport.isAvailable()) { LOGGER.debug("Using epoll transport"); return transport; } transport = new NativeTransport("io.netty.channel.kqueue", "KQueue"); if (transport.isAvailable()) { LOGGER.debug("Using kqueue transport"); return transport; } LOGGER.debug("Using nio transport"); return new NioTransport(); }
public static EventLoopGroup eventLoopGroup(int nThreads, ThreadFactory threadFactory) { return TRANSPORT.eventLoopGroup(nThreads, threadFactory); }
public static Class<? extends ServerSocketChannel> getServerSocketChannelImpl() { return TRANSPORT.getServerSocketChannelImpl(); }
public static Class<? extends SocketChannel> getSocketChannelImpl() { return TRANSPORT.getSocketChannelImpl(); }