io.netty.channel.nio.NioEventLoop Java Examples

The following examples show how to use io.netty.channel.nio.NioEventLoop. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ReactorNetty.java    From reactor-netty with Apache License 2.0 5 votes vote down vote up
static boolean mustChunkFileTransfer(Connection c, Path file) {
	// if channel multiplexing a parent channel as an http2 stream
	if (c.channel().parent() != null && c.channel().parent().pipeline().get(Http2ConnectionHandler.class) != null) {
		return true;
	}
	ChannelPipeline p = c.channel().pipeline();
	return p.get(SslHandler.class) != null  ||
			p.get(NettyPipeline.CompressionHandler) != null ||
			(!(c.channel().eventLoop() instanceof NioEventLoop) &&
					!"file".equals(file.toUri().getScheme()));
}
 
Example #2
Source File: UkcpClientChannel.java    From kcp-netty with MIT License 4 votes vote down vote up
@Override
protected boolean isCompatible(EventLoop loop) {
    return loop instanceof NioEventLoop;
}
 
Example #3
Source File: UkcpServerChildChannel.java    From kcp-netty with MIT License 4 votes vote down vote up
@Override
protected boolean isCompatible(EventLoop loop) {
    return loop instanceof NioEventLoop;
}